Jacob Garber
ae8301fddb
util/romcc: Fix parsing of empty string literal
...
The corner case of an empty string literal was causing romcc to
segfault. This checks if the literal is empty, and if so allocates a
size one buffer for the terminating null character. A test case for
this is added to ensure it doesn't happen again.
Found-by: Coverity CID 1129099
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Change-Id: I067160a3b9998184f44e4878ef6269f372fe68bb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32852
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-05-21 09:28:36 +00:00
..
2010-04-27 06:56:47 +00:00
2003-07-12 01:40:54 +00:00
2010-04-27 06:56:47 +00:00
2003-07-04 15:14:04 +00:00
2003-10-11 06:20:25 +00:00
2003-10-11 06:20:25 +00:00
2004-03-11 15:01:31 +00:00
2004-03-11 15:01:31 +00:00
2004-03-11 15:01:31 +00:00
2015-06-08 00:55:07 +02:00
2015-06-08 00:55:07 +02:00
2015-06-08 00:55:07 +02:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2016-04-13 17:36:39 +02:00
2010-04-27 06:56:47 +00:00
2003-10-11 06:20:25 +00:00
2016-04-13 17:37:03 +02:00
2018-08-28 14:22:24 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2019-05-20 14:45:35 +00:00
2016-04-13 17:37:03 +02:00
2003-10-11 06:20:25 +00:00
2016-04-13 17:37:03 +02:00
2004-05-28 14:11:54 +00:00
2004-05-28 14:11:54 +00:00
2004-05-28 14:11:54 +00:00
2004-05-28 14:11:54 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2018-08-28 14:22:24 +00:00
2018-08-28 14:22:24 +00:00
2003-06-10 21:22:07 +00:00
2003-06-16 16:57:34 +00:00
2003-07-01 10:05:30 +00:00
2019-05-20 14:45:35 +00:00
2019-05-20 14:45:35 +00:00
2018-08-28 14:22:24 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2017-09-27 16:38:18 +00:00
2017-09-27 16:38:18 +00:00
2017-09-27 16:38:18 +00:00
2010-04-27 06:56:47 +00:00
2003-04-22 18:44:01 +00:00
2003-04-22 18:44:01 +00:00
2015-06-08 00:55:07 +02:00
2003-04-22 18:44:01 +00:00
2015-06-08 00:55:07 +02:00
2003-04-22 18:44:01 +00:00
2003-04-22 18:44:01 +00:00
2003-04-22 18:44:01 +00:00
2003-05-08 00:31:34 +00:00
2015-06-08 00:55:07 +02:00
2003-05-08 00:31:34 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2003-06-10 21:22:07 +00:00
2010-04-27 06:56:47 +00:00
2003-06-10 21:22:07 +00:00
2003-06-10 21:22:07 +00:00
2003-06-10 21:22:07 +00:00
2003-06-10 21:22:07 +00:00
2010-04-27 06:56:47 +00:00
2003-06-10 21:22:07 +00:00
2003-06-10 21:22:07 +00:00
2018-08-28 14:22:24 +00:00
2003-06-11 21:55:00 +00:00
2010-04-27 06:56:47 +00:00
2015-06-08 00:55:07 +02:00
2003-06-19 15:14:52 +00:00
2003-06-19 15:14:52 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2003-07-12 01:40:54 +00:00
2003-06-28 06:49:45 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2019-05-20 14:45:35 +00:00
2015-06-08 00:55:07 +02:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2003-07-01 10:05:30 +00:00
2003-07-01 10:05:30 +00:00
2003-07-01 10:05:30 +00:00
2019-05-20 14:45:35 +00:00
2003-07-04 15:14:04 +00:00
2010-04-27 06:56:47 +00:00
2003-10-11 06:20:25 +00:00
2003-10-11 06:20:25 +00:00
2010-04-27 06:56:47 +00:00
2004-05-28 14:11:54 +00:00
2017-09-27 16:38:18 +00:00
2003-10-11 06:20:25 +00:00
2003-10-11 06:20:25 +00:00
2003-10-11 06:20:25 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2003-10-11 06:20:25 +00:00
2003-10-22 04:03:46 +00:00
2003-10-22 04:03:46 +00:00
2004-05-28 14:11:54 +00:00
2015-06-08 00:55:07 +02:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2010-04-27 06:56:47 +00:00
2004-05-28 14:11:54 +00:00
2004-05-28 14:11:54 +00:00
2004-05-28 14:11:54 +00:00
2015-06-08 00:55:07 +02:00
2010-04-27 06:56:47 +00:00
2015-06-08 00:55:07 +02:00
2004-05-28 14:11:54 +00:00
2004-05-28 14:11:54 +00:00
2004-05-28 14:11:54 +00:00
2004-05-28 14:11:54 +00:00
2019-05-21 09:28:36 +00:00
2010-04-27 06:56:47 +00:00