aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs
diff options
context:
space:
mode:
authorGravatar Rob Landley <rob@landley.net>2006-06-25 00:34:52 +0000
committerGravatar Rob Landley <rob@landley.net>2006-06-25 00:34:52 +0000
commit768945b762b8850691acd2b63116eed18faa1812 (patch)
tree7b443f4d614e327205a5aa17f2c0371c2a04723e /e2fsprogs
parent641c3537c0bf63793a6195108a1d2e682ed4cba1 (diff)
downloadbusybox-768945b762b8850691acd2b63116eed18faa1812.tar.gz
busybox-768945b762b8850691acd2b63116eed18faa1812.tar.bz2
A few patches from Erik Hovland, turning strncpy() into safe_strncpy() and
removing some unnecessary code.
Diffstat (limited to 'e2fsprogs')
-rw-r--r--e2fsprogs/tune2fs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/e2fsprogs/tune2fs.c b/e2fsprogs/tune2fs.c
index 65ff445e7..521e49874 100644
--- a/e2fsprogs/tune2fs.c
+++ b/e2fsprogs/tune2fs.c
@@ -699,13 +699,13 @@ int tune2fs_main(int argc, char **argv)
if (strlen(new_label) > sizeof(sb->s_volume_name))
bb_error_msg("Warning: label too long, truncating\n");
memset(sb->s_volume_name, 0, sizeof(sb->s_volume_name));
- strncpy(sb->s_volume_name, new_label,
+ safe_strncpy(sb->s_volume_name, new_label,
sizeof(sb->s_volume_name));
ext2fs_mark_super_dirty(fs);
}
if (M_flag) {
memset(sb->s_last_mounted, 0, sizeof(sb->s_last_mounted));
- strncpy(sb->s_last_mounted, new_last_mounted,
+ safe_strncpy(sb->s_last_mounted, new_last_mounted,
sizeof(sb->s_last_mounted));
ext2fs_mark_super_dirty(fs);
}