diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-06-01 10:57:00 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-11 09:42:46 +0200 |
commit | 0d460d6f414e02805cbc348404db03b2b7907360 (patch) | |
tree | ab357e0a511d5433517594c1a851c418bcec8a2e /block/vvfat.c | |
parent | 7ef6d3dc39f81bb798b153d8bfcab1e50bbc04b1 (diff) |
vvfat: Fix potential buffer overflow
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>
Diffstat (limited to 'block/vvfat.c')
-rw-r--r-- | block/vvfat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/vvfat.c b/block/vvfat.c index ba207e21fc..7e9e35a3a3 100644 --- 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); |