summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorKarel Zak2019-01-14 11:58:06 +0100
committerKarel Zak2019-01-14 11:58:06 +0100
commit5ae171e1f95be929b3486c4b9feed236cd3a3260 (patch)
treefd08404fcc7bfb3467c9c9db1de0bf99d3dfc61e /sys-utils
parentbash-completion: umount support relative path and ~ as home shorthands (diff)
parentreadprofile: check input file is not empty [asan] (diff)
downloadkernel-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.c2
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);