1 From 9a95ca5da96846f3edea48ab18c6365001805e70 Mon Sep 17 00:00:00 2001
2 From: Mike Fleetwood <mike.fleetwood@googlemail.com>
3 Date: Sun, 28 Feb 2016 15:36:10 +0000
4 Subject: [PATCH 29/30] lib-fs-resize: Prevent crash resizing FAT with very
7 Resizing a FAT file system crashes in libparted/fs/r/fat/count.c
8 flag_traverse_dir() if the length of any path name in the file system
9 overflows the 512 byte file_name local buffer. Increase buffer to 4096,
13 https://bugzilla.gnome.org/show_bug.cgi?id=762448
15 libparted/fs/r/fat/count.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
18 diff --git a/libparted/fs/r/fat/count.c b/libparted/fs/r/fat/count.c
19 index 7949e47..a5837c0 100644
20 --- a/libparted/fs/r/fat/count.c
21 +++ b/libparted/fs/r/fat/count.c
22 @@ -219,7 +219,7 @@ flag_traverse_dir (FatTraverseInfo* trav_info) {
23 PedFileSystem* fs = trav_info->fs;
24 FatDirEntry* this_entry;
25 FatTraverseInfo* subdir_trav_info;
26 - char file_name [512];
27 + char file_name [4096];
28 char* file_name_start;
29 FatCluster first_cluster;