diff options
Diffstat (limited to 'kexec/kexec.c')
-rw-r--r-- | kexec/kexec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c index 3a1656a..f898428 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -408,6 +408,8 @@ char *slurp_file(const char *filename, off_t *r_size) die("read on %s of %ld bytes failed: %s\n", filename, (size - progress)+ 0UL, strerror(errno)); } + if (result == 0) + die("read on %s ended before stat said it should\n", filename); progress += result; } result = close(fd); |