diff options
author | John Crispin <john@phrozen.org> | 2018-01-22 07:22:40 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-02-11 14:29:22 +0100 |
commit | c4a3c9785e9e554f5b89dd95c3071bd4f30cbdbc (patch) | |
tree | a92a832debfb3d5fc302c327f4c398256cde61d6 | |
parent | 50107109fef136e180b18701524cb8f7b6ea3b5b (diff) | |
download | fstools-c4a3c9785e9e554f5b89dd95c3071bd4f30cbdbc.tar.gz |
fix vfat volume label
the libblkid copies len+1 bytes causing a buffer overrun.
Signed-off-by: John Crispin <john@phrozen.org>
-rw-r--r-- | libblkid-tiny/vfat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libblkid-tiny/vfat.c b/libblkid-tiny/vfat.c index e3daf75..9f3d395 100644 --- a/libblkid-tiny/vfat.c +++ b/libblkid-tiny/vfat.c @@ -303,7 +303,7 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag) struct vfat_super_block *vs; struct msdos_super_block *ms; const unsigned char *vol_label = 0; - unsigned char *vol_serno = NULL, vol_label_buf[11]; + unsigned char *vol_serno = NULL, vol_label_buf[12] = { 0 }; uint16_t sector_size = 0, reserved; uint32_t cluster_count, fat_size; const char *version = NULL; |