Files
u-boot/common
Rabin Vincent 128059b926 hush: fix segfault on syntax error
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)
2014-11-07 16:27:06 -05:00
..
2014-10-27 17:54:13 -04:00
2014-07-18 17:53:24 -04:00
2013-04-01 16:33:52 -04:00
2014-10-24 16:04:59 -04:00
2014-11-07 16:27:06 -05:00
2014-06-11 16:25:47 -04:00
2014-02-04 16:32:20 +01:00
2014-05-27 10:21:32 -04:00
2014-08-09 11:17:03 -04:00
2014-08-09 11:16:57 -04:00
2014-08-09 11:16:57 -04:00
2014-10-26 14:03:08 -04:00
2014-06-20 11:54:29 -06:00
2014-06-05 14:38:38 -04:00
2013-08-16 13:45:15 -04:00
2014-03-22 14:47:22 -06:00
2013-05-31 17:12:03 -05:00
2014-05-12 15:19:46 -04:00
2012-08-09 23:39:18 +02:00
2014-10-25 07:27:37 -04:00
2013-04-01 16:33:52 -04:00
2014-01-14 09:01:06 -05:00
2014-03-21 16:43:59 -04:00
2014-01-14 09:01:06 -05:00
2014-04-17 17:44:36 -04:00
2014-03-21 16:43:59 -04:00
2014-03-21 16:43:59 -04:00
2014-10-22 10:36:47 -06:00
2014-03-21 16:43:59 -04:00
2014-10-22 10:36:46 -06:00
2014-06-20 11:54:29 -06:00
2014-09-16 12:23:56 -04:00
2014-10-25 07:01:59 -04:00
2014-07-18 17:53:23 -04:00
2014-11-04 06:04:00 +01:00