aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-25 00:34:52 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-25 00:34:52 +0000
commit592894bed22253fcdf0c80631cdc6442c4edfa7a (patch)
tree7b443f4d614e327205a5aa17f2c0371c2a04723e /e2fsprogs
parent61adb53721a2f1bad01378f51df45e42629beb24 (diff)
downloadbusybox-w32-592894bed22253fcdf0c80631cdc6442c4edfa7a.tar.gz
busybox-w32-592894bed22253fcdf0c80631cdc6442c4edfa7a.tar.bz2
busybox-w32-592894bed22253fcdf0c80631cdc6442c4edfa7a.zip
A few patches from Erik Hovland, turning strncpy() into safe_strncpy() and
removing some unnecessary code. git-svn-id: svn://busybox.net/trunk/busybox@15505 69ca8d6d-28ef-0310-b511-8ec308f3f277
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)
699 if (strlen(new_label) > sizeof(sb->s_volume_name)) 699 if (strlen(new_label) > sizeof(sb->s_volume_name))
700 bb_error_msg("Warning: label too long, truncating\n"); 700 bb_error_msg("Warning: label too long, truncating\n");
701 memset(sb->s_volume_name, 0, sizeof(sb->s_volume_name)); 701 memset(sb->s_volume_name, 0, sizeof(sb->s_volume_name));
702 strncpy(sb->s_volume_name, new_label, 702 safe_strncpy(sb->s_volume_name, new_label,
703 sizeof(sb->s_volume_name)); 703 sizeof(sb->s_volume_name));
704 ext2fs_mark_super_dirty(fs); 704 ext2fs_mark_super_dirty(fs);
705 } 705 }
706 if (M_flag) { 706 if (M_flag) {
707 memset(sb->s_last_mounted, 0, sizeof(sb->s_last_mounted)); 707 memset(sb->s_last_mounted, 0, sizeof(sb->s_last_mounted));
708 strncpy(sb->s_last_mounted, new_last_mounted, 708 safe_strncpy(sb->s_last_mounted, new_last_mounted,
709 sizeof(sb->s_last_mounted)); 709 sizeof(sb->s_last_mounted));
710 ext2fs_mark_super_dirty(fs); 710 ext2fs_mark_super_dirty(fs);
711 } 711 }