diff options
Diffstat (limited to 'sys-utils')
-rw-r--r-- | sys-utils/readprofile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c index 035073847..75a623bc9 100644 --- a/sys-utils/readprofile.c +++ b/sys-utils/readprofile.c @@ -246,6 +246,8 @@ int main(int argc, char **argv) || ((int)(len = lseek(proFd, 0, SEEK_END)) < 0) || (lseek(proFd, 0, SEEK_SET) < 0)) err(EXIT_FAILURE, "%s", proFile); + if (!len) + errx(EXIT_FAILURE, "%s: %s", proFile, _("input file is empty")); buf = xmalloc(len); |