Commit ID:      10059E695CD2C830620
CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2017/10/17 23:45:20 UTC

Modified files:
        bin/mksh       : check.t lex.c sh.h

Log message:
tentatively fix Debian #878947 by putting an end to (some) nesting

‣ also makes the error message nicer:
tg@blau:/usr/obj/bin/mksh $ mksh -n -c '${0$(($(o[))&$(($(p[))&)'
internal error: can't allocate 8388628 data bytes
tg@blau:/usr/obj/bin/mksh $ mksh -n -c '${0$(($(o[))&$(($(p[))&)^J'
mksh: no closing quote
1|tg@blau:/usr/obj/bin/mksh $ ./mksh -n -c '${0$(($(o[))&$(($(p[))&)'
./mksh: syntax error: unmatched '('
1|tg@blau:/usr/obj/bin/mksh $ ./mksh -n -c '${0$(($(o[))&$(($(p[))&)^J'
./mksh: syntax error: unmatched '('

‣ alternative fix would be to keep the block and do…
-                                       } else {
+                                       } else if (source->type != SEOF) {
… but that would keep “no closing quote” for the case with newline,
and since this seems to not break… nuking unused code is always good ☻

To generate a diff of this changeset, execute the following commands:
cvs -R rdiff -kk -upr1.798 -r1.799 src/bin/mksh/check.t
cvs -R rdiff -kk -upr1.239 -r1.240 src/bin/mksh/lex.c
cvs -R rdiff -kk -upr1.848 -r1.849 src/bin/mksh/sh.h

Reply via email to