commit-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[1747] 2008-07-29 Bean <address@hidden>


From: Bean
Subject: [1747] 2008-07-29 Bean <address@hidden>
Date: Tue, 29 Jul 2008 15:07:48 +0000

Revision: 1747
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1747
Author:   bean
Date:     2008-07-29 15:07:47 +0000 (Tue, 29 Jul 2008)

Log Message:
-----------
2008-07-29  Bean  <address@hidden>

        * normal/main.c (get_line): Fix buffer overflow bug.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/normal/main.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog       2008-07-28 22:37:32 UTC (rev 1746)
+++ trunk/grub2/ChangeLog       2008-07-29 15:07:47 UTC (rev 1747)
@@ -1,3 +1,7 @@
+2008-07-29  Bean  <address@hidden>
+
+       * normal/main.c (get_line): Fix buffer overflow bug.
+
 2008-07-28  Robert Millan  <address@hidden>
 
        * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.

Modified: trunk/grub2/normal/main.c
===================================================================
--- trunk/grub2/normal/main.c   2008-07-28 22:37:32 UTC (rev 1746)
+++ trunk/grub2/normal/main.c   2008-07-29 15:07:47 UTC (rev 1747)
@@ -97,9 +97,6 @@
        }
       else
        {
-         if (c == '\n')
-           break;
-
          if (pos >= max_len)
            {
              char *old_cmdline = cmdline;
@@ -112,6 +109,9 @@
                }
            }
 
+         if (c == '\n')
+           break;
+
          cmdline[pos++] = c;
        }
     }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]