perl-unicode

[PATCH 5.005_52] Core dump from "Missing right brace on \x{}"

1998-10-14 13:15:52
Gisle Aas <gisle(_at_)aas(_dot_)no> writes:

$ ./perl -e '"\x{FF";'
Missing right brace on \x{} at -e line 1, within string
Segmentation fault (core dumped)

This is a fix:

Index: toke.c
===================================================================
RCS file: /usr/home/aas/CVSROOT/perl_52/toke.c,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 toke.c
--- toke.c      1998/10/06 17:30:50     1.1.1.1
+++ toke.c      1998/10/14 13:13:59
@@ -1076,8 +1076,10 @@
                if (*s == '{') {
                    char* e = strchr(s, '}');
 
-                   if (!e)
+                   if (!e) {
                        yyerror("Missing right brace on \\x{}");
+                       e = s;
+                   }
                    if (!utf) {
                        dTHR;
                        if (ckWARN(WARN_UTF8))

<Prev in Thread] Current Thread [Next in Thread>