switch-coreboot/util/romcc
Patrick Georgi fcb772c2f2 UPSTREAM: util/romcc: Don't read 'member' if it might be NULL
The earlier loop exits gracefully iff i == index. In other cases, member
might be NULL, so check that the scan was successful before using its
results.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1129147
Reviewed-on: https://review.coreboot.org/17887
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I818c233d797d82fa819243c4626dd9c4b7de3ac6
Reviewed-on: https://chromium-review.googlesource.com/422219
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-19 09:54:37 -08:00
..
results Undoing all HDAMA commits from LNXI from r2005->2003 2005-08-10 15:16:44 +00:00
tests romcc: Use UNIX line endings in linux tests 2016-04-13 17:37:03 +02:00
COPYING Remove address from GPLv2 headers 2015-05-21 20:50:25 +02:00
Makefile romcc: Remove old test infrastructure, rework Makefile 2016-04-14 19:13:07 +02:00
romcc.1 romcc.1: Point bug reporters to the coreboot ML / bug tracker 2016-05-01 16:29:09 +02:00
romcc.c UPSTREAM: util/romcc: Don't read 'member' if it might be NULL 2016-12-19 09:54:37 -08:00
test.sh romcc: Remove old test infrastructure, rework Makefile 2016-04-14 19:13:07 +02:00