
10 Nov
2014
10 Nov
'14
10:27 p.m.
On Wed, Oct 29, 2014 at 11:21:40PM +0100, Rabin Vincent 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)
Applied to u-boot/master, thanks!
--
Tom