Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17860
-gerrit
commit a707f58edd0f525fdd6accf9d4fe8d17df0f852a Author: Patrick Georgi pgeorgi@chromium.org Date: Wed Dec 14 16:11:58 2016 +0100
util/cbfstool: check that buffer_create worked
We might not care much about this buffer, but we really use it later on...
Change-Id: Ia16270f836d05d8b454e77de7b5babeb6bb05d6d Signed-off-by: Patrick Georgi pgeorgi@chromium.org Found-by: Coverity Scan #1294797 --- util/cbfstool/cbfstool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index 7a71427..d3c15e0 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -776,7 +776,8 @@ static int cbfs_create(void) struct buffer bootblock; if (!param.bootblock) { DEBUG("-B not given, creating image without bootblock.\n"); - buffer_create(&bootblock, 0, "(dummy)"); + if (buffer_create(&bootblock, 0, "(dummy)") != 0) + return 1; } else if (buffer_from_file(&bootblock, param.bootblock)) { return 1; }