]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/gnulib/regcomp.c (regerror): Fix out-of-range array lookup.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 10 Mar 2012 11:31:42 +0000 (12:31 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 10 Mar 2012 11:31:42 +0000 (12:31 +0100)
ChangeLog
grub-core/gnulib/regcomp.c

index d4b56d94f122a4a87f01966a1464976079725cf9..e3c7a7bc79b808526c521bead79509c699c919b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/gnulib/regcomp.c (regerror): Fix out-of-range array lookup.
+
 2012-03-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/gdb/i386/idt.c (grub_gdb_breakpoint): Remove old debug code.
index 083469ef31c2897e35022fde3916405bc5d30079..ddea3fb656162e4f3100d4c28c0c4150585d4835 100644 (file)
@@ -555,9 +555,9 @@ regerror (int errcode, const regex_t *_Restrict_ preg,
        to this routine.  If we are given anything else, or if other regex
        code generates an invalid error code, then the program has a bug.
        Dump core so we can fix it.  */
-    msg = "unknown regexp error";
-
-  msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
+    msg = gettext ("unknown regexp error");
+  else
+    msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
 
   msg_size = strlen (msg) + 1; /* Includes the null.  */