aboutsummaryrefslogtreecommitdiff
path: root/toys/other/losetup.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-01-01 16:59:35 -0600
committerRob Landley <rob@landley.net>2015-01-01 16:59:35 -0600
commit82effc97f9f2d1c258ea50cb11b130753b8ba805 (patch)
treef6c584d2b1675a91eb1a016977560ff7148c15a1 /toys/other/losetup.c
parent5f53d130b1eae9041cc88c0ffb89e2b5823da393 (diff)
downloadtoybox-82effc97f9f2d1c258ea50cb11b130753b8ba805.tar.gz
Switch a lot of strncpy() calls to xstrncpy().
Diffstat (limited to 'toys/other/losetup.c')
-rw-r--r--toys/other/losetup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/losetup.c b/toys/other/losetup.c
index e3094ef0..9568627e 100644
--- a/toys/other/losetup.c
+++ b/toys/other/losetup.c
@@ -112,7 +112,7 @@ static void loopback_setup(char *device, char *file)
if (ioctl(lfd, LOOP_SET_FD, ffd)) perror_exit("%s=%s", device, file);
loop->lo_offset = TT.offset;
loop->lo_sizelimit = TT.size;
- strncpy((char *)loop->lo_file_name, s, LO_NAME_SIZE);
+ xstrncpy((char *)loop->lo_file_name, s, LO_NAME_SIZE);
s[LO_NAME_SIZE-1] = 0;
if (ioctl(lfd, LOOP_SET_STATUS64, loop)) perror_exit("%s=%s", device, file);
if (flags & FLAG_s) printf("%s", device);