diff --git a/ChangeLog b/ChangeLog index c8f1b9cbf..722f55c3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-09-16 Robert Millan + + * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of + uninitialized `lastaddr'. + 2009-09-15 Vladimir Serbinenko * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops. diff --git a/partmap/msdos.c b/partmap/msdos.c index a5d55b64d..6ba7fb927 100644 --- a/partmap/msdos.c +++ b/partmap/msdos.c @@ -110,6 +110,10 @@ pc_partition_map_iterate (grub_disk_t disk, p.data = &pcdata; p.partmap = &grub_msdos_partition_map; + /* Any value different than `p.offset' will satisfy the check during + first loop. */ + lastaddr = !p.offset; + while (1) { int i;