[coreboot-gerrit] New patch to review for coreboot: util/cbfstool: more careful handling of error conditions
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Wed Dec 14 16:17:50 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17861
-gerrit
commit e469488591cb4cca910aee59ea394c3d6387c301
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Wed Dec 14 16:16:47 2016 +0100
util/cbfstool: more careful handling of error conditions
Change-Id: I72a7776d530d1cf0b8fa39e558990df3dc7f7805
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Found-by: Coverity Scan #1295494
---
util/cbfstool/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index 3093ba1..3175f1b 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -72,7 +72,7 @@ int buffer_from_file(struct buffer *buffer, const char *filename)
}
buffer->offset = 0;
buffer->size = get_file_size(fp);
- if (buffer->size == -1u) {
+ if (buffer->size < 0) {
fprintf(stderr, "could not determine size of %s\n", filename);
fclose(fp);
return -1;
More information about the coreboot-gerrit
mailing list