NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/53712: /bin/sh crashes on syntax error
>Number: 53712
>Category: bin
>Synopsis: /bin/sh crashes on syntax error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 08 22:10:00 +0000 2018
>Originator: Roland Illig
>Release: 7.0.2, also current as of 2018-11-08
>Organization:
>Environment:
NetBSD nb7.fritz.box 7.0.2 NetBSD 7.0.2 (GENERIC.201610210724Z) amd64
>Description:
$ sh -c '{ } > out'
Segmentation fault (core dumped)
$ bash -c '{ } > out'
bash: -c: line 0: syntax error near unexpected token `}'
bash: -c: line 0: `{ } > out'
$ pkglint -Wall -s pkglint-test.mk
> { } > out
WARN: pkglint-test.mk:2: Pkglint ShellLine.CheckShellCommand: parse error at []string{"}", ">", "out"}
>How-To-Repeat:
>Fix:
in bin/sh/parser.c, the crash happens in this line:
if (n1->type != NSUBSHELL) {
Home |
Main Index |
Thread Index |
Old Index