
1 Nov
2014
1 Nov
'14
4:11 p.m.
Hi Rabin,
On 29 October 2014 16:21, Rabin Vincent rabin@rab.in wrote:
Hush segfaults if it sees a syntax error while attempting to parse a command:
$ ./u-boot -c "'" ... syntax error Segmentation fault (core dumped)
This is due to a NULL pointer dereference of in_str->p in static_peek(). The problem is that the exit condition for the loop in parse_stream_outer() checks for rcode not being -1, but rcode is only ever 0 or 1.
Signed-off-by: Rabin Vincent rabin@rab.in
Acked-by: Simon Glass <sjg@chromium.org) Tested-by: Simon Glass <sjg@chromium.org)
BTW I notice that I still get a crash with
./u-boot -c "''"
Regards, Simon