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 ☻
This commit is contained in:
6
check.t
6
check.t
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.t,v 1.798 2017/10/14 21:09:46 tg Exp $
|
# $MirOS: src/bin/mksh/check.t,v 1.799 2017/10/17 23:45:16 tg Exp $
|
||||||
# -*- mode: sh -*-
|
# -*- mode: sh -*-
|
||||||
#-
|
#-
|
||||||
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
@ -30,7 +30,7 @@
|
|||||||
# (2013/12/02 20:39:44) http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/regress/bin/ksh/?sortby=date
|
# (2013/12/02 20:39:44) http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/regress/bin/ksh/?sortby=date
|
||||||
|
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)MIRBSD KSH R56 2017/10/14
|
@(#)MIRBSD KSH R56 2017/10/17
|
||||||
description:
|
description:
|
||||||
Check base version of full shell
|
Check base version of full shell
|
||||||
stdin:
|
stdin:
|
||||||
@ -39,7 +39,7 @@ name: KSH_VERSION
|
|||||||
category: !shell:legacy-yes
|
category: !shell:legacy-yes
|
||||||
---
|
---
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)LEGACY KSH R56 2017/10/14
|
@(#)LEGACY KSH R56 2017/10/17
|
||||||
description:
|
description:
|
||||||
Check base version of legacy shell
|
Check base version of legacy shell
|
||||||
stdin:
|
stdin:
|
||||||
|
11
lex.c
11
lex.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.239 2017/05/05 22:53:29 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.240 2017/10/17 23:45:18 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* states while lexing word
|
* states while lexing word
|
||||||
@ -284,15 +284,6 @@ yylex(int cf)
|
|||||||
}
|
}
|
||||||
afree(tmp, ATEMP);
|
afree(tmp, ATEMP);
|
||||||
break;
|
break;
|
||||||
} else {
|
|
||||||
Source *s;
|
|
||||||
|
|
||||||
s = pushs(SREREAD,
|
|
||||||
source->areap);
|
|
||||||
s->start = s->str =
|
|
||||||
s->u.freeme = tmp;
|
|
||||||
s->next = source;
|
|
||||||
source = s;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*wp++ = CHAR;
|
*wp++ = CHAR;
|
||||||
|
4
sh.h
4
sh.h
@ -182,9 +182,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.848 2017/10/14 21:09:48 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.849 2017/10/17 23:45:19 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R56 2017/10/14"
|
#define MKSH_VERSION "R56 2017/10/17"
|
||||||
|
|
||||||
/* arithmetic types: C implementation */
|
/* arithmetic types: C implementation */
|
||||||
#if !HAVE_CAN_INTTYPES
|
#if !HAVE_CAN_INTTYPES
|
||||||
|
Reference in New Issue
Block a user