public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/format_text/import_vsn1.c ...
@ 2005-05-09 16:59 agk
0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2005-05-09 16:59 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2005-05-09 16:59:01
Modified files:
. : WHATS_NEW
lib/format_text: import_vsn1.c
lib/metadata : lv_manip.c merge.c metadata.h mirror.c
segtype.h snapshot_manip.c
Log message:
lv_reduce tidying.
Remove some unnecessary parameters.
Introduce seg_is macros.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.234&r2=1.235
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.23&r2=1.24
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.69&r2=1.70
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.20&r2=1.21
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.118&r2=1.119
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/segtype.h.diff?cvsroot=lvm2&r1=1.1&r2=1.2
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/snapshot_manip.c.diff?cvsroot=lvm2&r1=1.19&r2=1.20
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2 ./WHATS_NEW lib/format_text/import_vsn1.c ...
@ 2011-03-13 23:05 zkabelac
0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2011-03-13 23:05 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2011-03-13 23:05:49
Modified files:
. : WHATS_NEW
lib/format_text: import_vsn1.c
lib/format1 : import-export.c
lib/metadata : metadata.c
Log message:
Fix allocation of system_id
As code uses strncpy(system_id, NAME_LEN) and doesn't set '\0'
Fix it by always allocating NAME_LEN + 1 buffer size and with zalloc
we always get '\0' as the last byte.
This bug may trigger some unexpected behavior of the string operation
code - depends on the pool allocator.
FIXME: refactor this code to alloc_vg.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1953&r2=1.1954
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.84&r2=1.85
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format1/import-export.c.diff?cvsroot=lvm2&r1=1.116&r2=1.117
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.448&r2=1.449
--- LVM2/WHATS_NEW 2011/03/13 22:57:51 1.1953
+++ LVM2/WHATS_NEW 2011/03/13 23:05:48 1.1954
@@ -1,5 +1,6 @@
Version 2.02.85 -
===================================
+ Fix allocation of system_id buffer in volume_group structure.
Fix buffer allocation in build_dm_uuid().
Fix readlink usage inside get_primary_dev().
Use format instance mempool where possible and adequate.
--- LVM2/lib/format_text/import_vsn1.c 2011/03/11 14:50:15 1.84
+++ LVM2/lib/format_text/import_vsn1.c 2011/03/13 23:05:48 1.85
@@ -666,7 +666,7 @@
if (!(vg = alloc_vg("read_vg", fid->fmt->cmd, vgn->key)))
return_NULL;
- if (!(vg->system_id = dm_pool_zalloc(vg->vgmem, NAME_LEN)))
+ if (!(vg->system_id = dm_pool_zalloc(vg->vgmem, NAME_LEN + 1)))
goto_bad;
vgn = vgn->child;
--- LVM2/lib/format1/import-export.c 2010/11/30 22:57:35 1.116
+++ LVM2/lib/format1/import-export.c 2011/03/13 23:05:48 1.117
@@ -225,7 +225,7 @@
if (!(vg->name = dm_pool_strdup(mem, (char *)dl->pvd.vg_name)))
return_0;
- if (!(vg->system_id = dm_pool_alloc(mem, NAME_LEN)))
+ if (!(vg->system_id = dm_pool_zalloc(mem, NAME_LEN + 1)))
return_0;
*vg->system_id = '\0';
--- LVM2/lib/metadata/metadata.c 2011/03/11 15:10:17 1.448
+++ LVM2/lib/metadata/metadata.c 2011/03/13 23:05:49 1.449
@@ -934,7 +934,7 @@
}
vg->status = (RESIZEABLE_VG | LVM_READ | LVM_WRITE);
- if (!(vg->system_id = dm_pool_alloc(vg->vgmem, NAME_LEN)))
+ if (!(vg->system_id = dm_pool_zalloc(vg->vgmem, NAME_LEN + 1)))
goto_bad;
*vg->system_id = '\0';
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-13 23:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-09 16:59 LVM2 ./WHATS_NEW lib/format_text/import_vsn1.c agk
2011-03-13 23:05 zkabelac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).