Fix multiple issues reported by Coverity Scan

This commit is contained in:
hexkyz
2018-07-26 18:45:18 +01:00
parent fd88bd1d2c
commit 7836609839
10 changed files with 30 additions and 14 deletions

View File

@@ -65,7 +65,7 @@ int package1_read_and_parse_boot0(void **package1loader, size_t *package1loader_
/* Read the full keyblob area.*/
for (size_t i = 0; i < 32; i++) {
if (fread(d.sector, 0x200, 1, boot0) == 0) {
if (!fread(d.sector, 0x200, 1, boot0)) {
return -1;
}
keyblobs[i] = d.keyblob;