]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-09-16 Robert Millan <rmh.grub@aybabtu.com>
authorrobertmh <robertmh@localhost>
Wed, 16 Sep 2009 19:23:33 +0000 (19:23 +0000)
committerrobertmh <robertmh@localhost>
Wed, 16 Sep 2009 19:23:33 +0000 (19:23 +0000)
        * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
        uninitialized `lastaddr'.

ChangeLog
partmap/msdos.c

index c8f1b9cbf9523b36f9779520213b6922677dbb9d..722f55c3ba94cf9a881167b635f84ab82670d011 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-16  Robert Millan  <rmh.grub@aybabtu.com>
+
+       * partmap/msdos.c (pc_partition_map_iterate): Fix possible use of
+       uninitialized `lastaddr'.
+
 2009-09-15  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * partmap/msdos.c (pc_partition_map_iterate): Detect and break loops.
index a5d55b64d2b4ffccfd43d012b30d90c27b55d616..6ba7fb927cd47323a2a4f587ab87b12544c2f186 100644 (file)
@@ -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;