vfs_fat: fix another potential off-by-one bug in vfs, also reported by gcc 4.9
authorMoritz Hoffmann <moritzho@inf.ethz.ch>
Wed, 3 Dec 2014 15:26:03 +0000 (16:26 +0100)
committerMoritz Hoffmann <moritzho@inf.ethz.ch>
Wed, 3 Dec 2014 15:26:03 +0000 (16:26 +0100)
lib/vfs/vfs_fat.c

index 2f8cdf6..995f10c 100644 (file)
@@ -569,7 +569,7 @@ find_path(struct fat_mount *mount, const char *path,
         dirsearch_initialize(&search, parent);
 
         char dosfn[12];
-        uint16_t lfn_data[LFN_CHAR_COUNT];
+        uint16_t lfn_data[LFN_CHAR_COUNT + 1];
         bool has_lfn;
         char buf[LFN_CHAR_COUNT + 1];