projects
/
lwext4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0774773
)
Fix potential buffer overwrite.
author
Carl Hetherington
<cth@carlh.net>
Sun, 19 Jun 2022 20:52:28 +0000
(22:52 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 19 Jun 2022 20:52:28 +0000
(22:52 +0200)
src/ext4_mkfs.c
patch
|
blob
|
history
diff --git
a/src/ext4_mkfs.c
b/src/ext4_mkfs.c
index c6b89386ae6ce478df06a2052f4839ee09e04c3e..4ff2f75e7b2335c50c6d32a53ece861e10672052 100644
(file)
--- a/
src/ext4_mkfs.c
+++ b/
src/ext4_mkfs.c
@@
-264,7
+264,7
@@
static void fill_sb(struct fs_aux_info *aux_info, struct ext4_mkfs_info *info)
memcpy(sb->uuid, info->uuid, UUID_SIZE);
memset(sb->volume_name, 0, sizeof(sb->volume_name));
- strncpy(sb->volume_name, info->label, sizeof(sb->volume_name));
+ strncpy(sb->volume_name, info->label, sizeof(sb->volume_name)
- 1
);
memset(sb->last_mounted, 0, sizeof(sb->last_mounted));
sb->algorithm_usage_bitmap = to_le32(0);