OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ef6d3d
)
vvfat: Fix potential buffer overflow
author
Kevin Wolf
<kwolf@redhat.com>
Wed, 1 Jun 2011 08:57:00 +0000
(10:57 +0200)
committer
Kevin Wolf
<kwolf@redhat.com>
Tue, 11 Oct 2011 07:42:46 +0000
(09:42 +0200)
path2[PATH_MAX] can be used for the null termination, so make the array big
enough to allow this.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vvfat.c
patch
|
blob
|
history
diff --git
a/block/vvfat.c
b/block/vvfat.c
index
ba207e2
..
7e9e35a
100644
(file)
--- a/
block/vvfat.c
+++ b/
block/vvfat.c
@@
-1690,7
+1690,7
@@
static int check_directory_consistency(BDRVVVFATState *s,
long_file_name lfn;
int path_len = strlen(path);
- char path2[PATH_MAX];
+ char path2[PATH_MAX
+ 1
];
assert(path_len < PATH_MAX); /* len was tested before! */
pstrcpy(path2, sizeof(path2), path);