Hello community, here is the log from the commit of package evms checked in at Tue Mar 6 09:03:35 CET 2007. -------- --- evms/evms.changes 2007-02-23 19:11:25.000000000 +0100 +++ /mounts/work_src_done/STABLE/evms/evms.changes 2007-03-06 04:56:46.000000000 +0100 @@ -1,0 +2,6 @@ +Mon Mar 5 20:55:54 MST 2007 - cgao@novell.com + +-Fix a problem introduced when fixing strncat, #247364 +- sizeof( SRC ) - strlen ( SRC) - 1 doesn't work if SRC is a pointer + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ evms.spec ++++++ --- /var/tmp/diff_new_pack.x19968/_old 2007-03-06 09:02:55.000000000 +0100 +++ /var/tmp/diff_new_pack.x19968/_new 2007-03-06 09:02:55.000000000 +0100 @@ -21,7 +21,7 @@ %endif Autoreqprov: on Version: 2.5.5 -Release: 94 +Release: 96 Summary: EVMS--Enterprise Volume Management System BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: http://prdownloads.sourceforge.net/evms/evms-%{version}.tar.bz2 @@ -216,6 +216,9 @@ /etc/ha.d/resource.d/evms_failover %changelog +* Mon Mar 05 2007 - cgao@novell.com +-Fix a problem introduced when fixing strncat, #247364 +- sizeof( SRC ) - strlen ( SRC) - 1 doesn't work if SRC is a pointer * Fri Feb 23 2007 - cgao@novell.com - Applied a patch from upstream, #247020 * Thu Feb 08 2007 - aj@suse.de ++++++ strncat.patch ++++++ --- /var/tmp/diff_new_pack.x19968/_old 2007-03-06 09:02:56.000000000 +0100 +++ /var/tmp/diff_new_pack.x19968/_new 2007-03-06 09:02:56.000000000 +0100 @@ -81,67 +81,18 @@ count++; if (region->volume) { - strncat(volume_string, region->volume->name, EVMS_NAME_SIZE); -+ strncat(volume_string, region->volume->name, sizeof( volume_string ) - strlen( volume_string ) - 1 ); ++ strncat(volume_string, region->volume->name, EVMS_NAME_SIZE - strlen( volume_string )); } else { - strncat(volume_string, region->name, EVMS_NAME_SIZE); -+ strncat(volume_string, region->name, sizeof( volume_string ) - strlen( volume_string ) - 1 ); ++ strncat(volume_string, region->name, EVMS_NAME_SIZE - strlen( volume_string )); } - strncat(volume_string, "\n", 1); -+ strncat(volume_string, "\n", sizeof( volume_string ) - strlen( volume_string ) - 1 ); ++ strncat(volume_string, "\n", EVMS_NAME_SIZE - strlen( volume_string )); } } } ---- evms-2.5.5/plugins/lvm/lvm_names.c 2004-09-09 14:38:02.000000000 -0600 -+++ evms-2.5.5/plugins/lvm/lvm_names.c 2006-12-08 15:01:20.000000000 -0700 -@@ -54,11 +54,11 @@ - container_name[0] = '\0'; - - if (disk_group) { -- strncat(container_name, disk_group->name, EVMS_NAME_SIZE); -- strncat(container_name, "/", EVMS_NAME_SIZE-strlen(container_name)); -+ strncat(container_name, disk_group->name, sizeof( container_name ) - strlen( container_name ) - 1 ); -+ strncat(container_name, "/", sizeof( container_name ) - strlen( container_name ) - 1 ); - } -- strncat(container_name, LVM_DEV_DIRECTORY, EVMS_NAME_SIZE-strlen(container_name)); -- strncat(container_name, vg_name, EVMS_NAME_SIZE-strlen(container_name)); -+ strncat(container_name, LVM_DEV_DIRECTORY, sizeof( container_name ) - strlen( container_name ) - 1 ); -+ strncat(container_name, vg_name, sizeof( container_name ) - strlen( container_name ) - 1 ); - - LOG_EXIT_VOID(); - } -@@ -151,11 +151,11 @@ - */ - region_name[0] = '\0'; - if (disk_group_name) { -- strncat(region_name, disk_group_name, EVMS_NAME_SIZE-strlen(region_name)); -- strncat(region_name, "/", EVMS_NAME_SIZE-strlen(region_name)); -+ strncat(region_name, disk_group_name, sizeof( region_name ) - strlen( region_name ) - 1 ); -+ strncat(region_name, "/", sizeof( region_name ) - strlen( region_name ) - 1 ); - } -- strncat(region_name, LVM_DEV_DIRECTORY, EVMS_NAME_SIZE-strlen(region_name)); -- strncat(region_name, ptr, EVMS_NAME_SIZE-strlen(region_name)); -+ strncat(region_name, LVM_DEV_DIRECTORY, sizeof( region_name ) - strlen( region_name ) - 1 ); -+ strncat(region_name, ptr, sizeof( region_name ) - strlen( region_name ) - 1 ); - - out: - LOG_EXIT_INT(rc); -@@ -200,9 +200,9 @@ - lvm_translate_container_name_to_vg_name(group, vg_name); - - strncpy(lv_name, DEV_DIRECTORY, EVMS_NAME_SIZE); -- strncat(lv_name, vg_name, EVMS_NAME_SIZE-strlen(lv_name)); -- strncat(lv_name, "/", EVMS_NAME_SIZE-strlen(lv_name)); -- strncat(lv_name, simple_name, EVMS_NAME_SIZE-strlen(lv_name)); -+ strncat(lv_name, vg_name, sizeof( lv_name ) - strlen( lv_name ) - 1 ); -+ strncat(lv_name, "/", sizeof( lv_name ) - strlen( lv_name ) - 1 ); -+ strncat(lv_name, simple_name, sizeof( lv_name ) - strlen( lv_name ) - 1 ); - - LOG_EXIT_VOID(); - } - - --- evms-2.5.5/plugins/iscsi/iscsi.c 2006-04-07 10:51:54.000000000 -0600 +++ evms-2.5.5/plugins/iscsi/iscsi.c 2006-12-08 15:01:29.000000000 -0700 @@ -464,7 +464,7 @@ @@ -186,52 +137,6 @@ strncpy(pdata->parent_object_name, drive_link_name, EVMS_NAME_SIZE); - ---- evms-2.5.5/plugins/snapshot/snap_create.c 2006-02-22 13:21:25.000000000 -0700 -+++ evms-2.5.5/plugins/snapshot/snap_create.c 2006-12-08 15:01:33.000000000 -0700 -@@ -158,12 +158,12 @@ - parent_name[0] = '\0'; - - if (child_object->disk_group) { -- strncat(parent_name, child_object->disk_group->name, EVMS_NAME_SIZE); -- strncat(parent_name, "/", EVMS_NAME_SIZE-strlen(parent_name)); -+ strncat(parent_name, child_object->disk_group->name, sizeof( parent_name ) - strlen( parent_name ) - 1 ); -+ strncat(parent_name, "/", sizeof( parent_name ) - strlen( parent_name ) - 1 ); - } - -- strncat(parent_name, child_object->name, EVMS_NAME_SIZE-strlen(parent_name)); -- strncat(parent_name, "#origin#", EVMS_NAME_SIZE-strlen(parent_name)); -+ strncat(parent_name, child_object->name, sizeof( parent_name ) - strlen( parent_name ) - 1 ); -+ strncat(parent_name, "#origin#", sizeof( parent_name ) - strlen( parent_name ) - 1 ); - - LOG_EXIT_VOID(); - } -@@ -190,11 +190,11 @@ - * to the snapshot object name. - */ - if (snap_child->disk_group) { -- strncat(name, snap_child->disk_group->name, EVMS_NAME_SIZE); -- strncat(name, "/", EVMS_NAME_SIZE-strlen(name)); -+ strncat(name, snap_child->disk_group->name, sizeof( name ) - strlen( name ) - 1 ); -+ strncat(name, "/", sizeof( name ) - strlen( name ) - 1 ); - } - strncat(name, snap_child->feature_header->object_name, -- EVMS_NAME_SIZE-strlen(name)); -+ sizeof( name ) - strlen( name ) - 1 ); - - LOG_DEBUG("Allocating snapshot %s.\n", name); - -@@ -253,7 +253,7 @@ - snap_sibling->disk_group = snap_parent->disk_group; - strncpy(snap_sibling->name, name, EVMS_NAME_SIZE); - strncat(snap_sibling->name, "#sibling#", -- EVMS_NAME_SIZE-strlen(snap_sibling->name)); -+ sizeof( snap_sibling->name ) - strlen( snap_sibling->name ) - 1 ); - - out: - LOG_EXIT_PTR(volume); - - --- evms-2.5.5/plugins/snapshot/snap_options.c 2004-09-22 16:37:12.000000000 -0600 +++ evms-2.5.5/plugins/snapshot/snap_options.c 2006-12-08 15:01:33.000000000 -0700 @@ -43,10 +43,10 @@ @@ -274,3 +179,56 @@ g_free(text[SL_SIZE_COLUMN]); /* + + +--- evms-2.5.5/plugins/lvm/lvm_names.c 2004-09-09 14:38:02.000000000 -0600 ++++ evms-2.5.5/plugins/lvm/lvm_names.c 2007-03-05 20:01:26.000000000 -0700 +@@ -54,7 +54,7 @@ + container_name[0] = '\0'; + + if (disk_group) { +- strncat(container_name, disk_group->name, EVMS_NAME_SIZE); ++ strncat(container_name, disk_group->name, EVMS_NAME_SIZE-strlen(container_name)); + strncat(container_name, "/", EVMS_NAME_SIZE-strlen(container_name)); + } + strncat(container_name, LVM_DEV_DIRECTORY, EVMS_NAME_SIZE-strlen(container_name)); + + +--- evms-2.5.5/plugins/snapshot/snap_create.c 2006-02-22 13:21:25.000000000 -0700 ++++ evms-2.5.5/plugins/snapshot/snap_create.c 2007-03-05 20:16:25.000000000 -0700 +@@ -158,7 +158,7 @@ + parent_name[0] = '\0'; + + if (child_object->disk_group) { +- strncat(parent_name, child_object->disk_group->name, EVMS_NAME_SIZE); ++ strncat(parent_name, child_object->disk_group->name, EVMS_NAME_SIZE-strlen(parent_name)); + strncat(parent_name, "/", EVMS_NAME_SIZE-strlen(parent_name)); + } + +@@ -190,11 +190,11 @@ + * to the snapshot object name. + */ + if (snap_child->disk_group) { +- strncat(name, snap_child->disk_group->name, EVMS_NAME_SIZE); +- strncat(name, "/", EVMS_NAME_SIZE-strlen(name)); ++ strncat(name, snap_child->disk_group->name, sizeof( name ) - strlen(name)-1); ++ strncat(name, "/", sizeof( name ) -strlen(name)-1); + } + strncat(name, snap_child->feature_header->object_name, +- EVMS_NAME_SIZE-strlen(name)); ++ sizeof( name ) -strlen(name)-1); + + LOG_DEBUG("Allocating snapshot %s.\n", name); + +@@ -251,9 +251,9 @@ + snap_sibling->plugin = my_plugin_record; + snap_sibling->size = snap_child->feature_header->feature_data1_start_lsn; + snap_sibling->disk_group = snap_parent->disk_group; +- strncpy(snap_sibling->name, name, EVMS_NAME_SIZE); ++ strncpy(snap_sibling->name, name, sizeof( snap_sibling->name ) - strlen( snap_sibling->name ) - 1 ); + strncat(snap_sibling->name, "#sibling#", +- EVMS_NAME_SIZE-strlen(snap_sibling->name)); ++ sizeof( snap_sibling->name ) - strlen( snap_sibling->name ) - 1 ); + + out: + LOG_EXIT_PTR(volume); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org