Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de25d9c
)
mke2fs: fix fencepost error when calling strncat
author
Theodore Ts'o
<tytso@mit.edu>
Thu, 10 Jul 2014 19:33:57 +0000
(15:33 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 10 Jul 2014 19:33:57 +0000
(15:33 -0400)
There were other protections which would prevent a buffer overflow
from happening, but we should fix this nevertheless.
Addresses-Coverity-Bug: #1225003
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mk_hugefiles.c
patch
|
blob
|
history
diff --git
a/misc/mk_hugefiles.c
b/misc/mk_hugefiles.c
index
ea42b6c
..
41280f0
100644
(file)
--- a/
misc/mk_hugefiles.c
+++ b/
misc/mk_hugefiles.c
@@
-188,7
+188,7
@@
static blk64_t get_partition_start(const char *device_name)
cp = search_sysfs_block(st.st_rdev, path);
if (!cp)
return 0;
- strncat(path, "/start", SYSFS_PATH_LEN);
+ strncat(path, "/start", SYSFS_PATH_LEN
-1
);
f = fopen(path, "r");
if (!f)
return 0;