File: no-abort.patch

package info (click to toggle)
grub2 2.06-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 63,180 kB
  • sloc: ansic: 410,027; asm: 16,253; sh: 9,855; cpp: 2,049; makefile: 1,552; python: 1,468; sed: 427; lex: 393; yacc: 268; awk: 79; lisp: 50; perl: 31
file content (26 lines) | stat: -rw-r--r-- 822 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/lib/regcomp.c b/lib/regcomp.c
index cc85f35ac..de45ebb5c 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -528,9 +528,9 @@ regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf,
        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.  */
-    abort ();
-
-  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.  */
 
@@ -1136,7 +1136,7 @@ optimize_utf8 (re_dfa_t *dfa)
 	}
 	break;
       default:
-	abort ();
+	break;
       }
 
   if (mb_chars || has_period)