summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authorKarel Zak2019-05-20 12:42:43 +0200
committerKarel Zak2019-05-20 12:42:43 +0200
commit9f34182d5398e94c1d730d0bd6265966d1f0607e (patch)
tree05fe50c994da315e859ad2f11149b8a4efd94c5d /disk-utils
parentlib/colors: remove unnecessary goto (diff)
downloadkernel-qcow2-util-linux-9f34182d5398e94c1d730d0bd6265966d1f0607e.tar.gz
kernel-qcow2-util-linux-9f34182d5398e94c1d730d0bd6265966d1f0607e.tar.xz
kernel-qcow2-util-linux-9f34182d5398e94c1d730d0bd6265966d1f0607e.zip
sfdisk: use xstrcpy()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r--disk-utils/sfdisk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index 83f3cf8f7..5e2d9adf7 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -133,7 +133,7 @@ static int get_user_reply(const char *prompt, char *buf, size_t bufsz)
p = readline(prompt);
if (!p)
return 1;
- strncpy(buf, p, bufsz - 1);
+ xstrncpy(buf, p, bufsz);
free(p);
} else
#endif