diff options
| author | Tom Rini <[email protected]> | 2021-09-02 09:25:43 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-09-02 09:25:43 -0400 |
| commit | 4bb7de1b3c09ada52ec42249221f745a6cbd3360 (patch) | |
| tree | 9ab48619163e5fe33161a54cb8403438d099ac3c /tools | |
| parent | e2e5eec6ce1c2cb496a2a5e019a175a9fbdbed2a (diff) | |
| parent | 73059529b2046638971aeaa3c75c857458a5ec82 (diff) | |
Merge branch '2021-09-02-assorted-fixes' into next
- Drop old OpenSSL support
- Add DM_HASH support, use it.
- Assorted "stemmy" platform updates
- Various bugfixes
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mkimage.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/mkimage.c b/tools/mkimage.c index 302bfcf971f..fbe883ce362 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -732,6 +732,12 @@ copy_file (int ifd, const char *datafile, int pad) exit (EXIT_FAILURE); } + if (sbuf.st_size == 0) { + fprintf (stderr, "%s: Input file %s is empty, bailing out\n", + params.cmdname, datafile); + exit (EXIT_FAILURE); + } + ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0); if (ptr == MAP_FAILED) { fprintf (stderr, "%s: Can't read %s: %s\n", |
