Blame SOURCES/0029-lib-fs-resize-Prevent-crash-resizing-FAT-with-very-d.patch

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