diff options
Diffstat (limited to 'toys/other/losetup.c')
-rw-r--r-- | toys/other/losetup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/losetup.c b/toys/other/losetup.c index e3094ef..9568627 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); |