diff options
author | Karel Zak | 2019-01-14 11:58:06 +0100 |
---|---|---|
committer | Karel Zak | 2019-01-14 11:58:06 +0100 |
commit | 5ae171e1f95be929b3486c4b9feed236cd3a3260 (patch) | |
tree | fd08404fcc7bfb3467c9c9db1de0bf99d3dfc61e /sys-utils | |
parent | bash-completion: umount support relative path and ~ as home shorthands (diff) | |
parent | readprofile: check input file is not empty [asan] (diff) | |
download | kernel-qcow2-util-linux-5ae171e1f95be929b3486c4b9feed236cd3a3260.tar.gz kernel-qcow2-util-linux-5ae171e1f95be929b3486c4b9feed236cd3a3260.tar.xz kernel-qcow2-util-linux-5ae171e1f95be929b3486c4b9feed236cd3a3260.zip |
Merge branch 'asan-fixes' of https://github.com/kerolasa/util-linux
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); |