diff options
Diffstat (limited to 'tools/firmware-utils/src/trx2edips.c')
-rw-r--r-- | tools/firmware-utils/src/trx2edips.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/firmware-utils/src/trx2edips.c b/tools/firmware-utils/src/trx2edips.c index f8d068d502..14c4eb70ba 100644 --- a/tools/firmware-utils/src/trx2edips.c +++ b/tools/firmware-utils/src/trx2edips.c @@ -140,6 +140,10 @@ int main(int argc, char *argv[]) rewind(fpIn); /* read the whole file*/ res = fread(buf, 1, length, fpIn); + if (res != length) { + fprintf(stderr, "Unable to fread from input file\n"); + return EXIT_FAILURE; + } p = (struct trx_header *)buf; if (LOAD32_LE(p->magic) != TRX_MAGIC) { |