summaryrefslogtreecommitdiff
path: root/libraries/libfm/libfm_issue_3557764.patch
blob: adec5a84f9160c8d302b5fffcc5a649157f8eea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From f5dd721cd06761af60ea6003fa8832a65df2ea7e Mon Sep 17 00:00:00 2001
From: Andriy Grytsenko <andrej@rep.kiev.ua>
Date: Thu, 16 Aug 2012 02:45:36 +0300
Subject: [PATCH] quickfix for #3557764: pcmanfm-1.0 segfault in fm_file_info_is_image

---
 src/gtk/fm-folder-model.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/gtk/fm-folder-model.c b/src/gtk/fm-folder-model.c
index b80aa5c..2406698 100644
--- a/src/gtk/fm-folder-model.c
+++ b/src/gtk/fm-folder-model.c
@@ -1331,12 +1331,16 @@ static void on_thumbnail_max_changed(FmConfig* cfg, gpointer user_data)
 {
     FmFolderModel* model = (FmFolderModel*)user_data;
     FmThumbnailRequest* req;
-    GList* new_reqs = NULL, *l;
+    GList* new_reqs = NULL;
     GSequenceIter* seq_it;
     FmFileInfo* fi;
     guint thumbnail_max_bytes = fm_config->thumbnail_max << 10;
     goffset size;
 
+#if 0
+    /* disabled due to bug #3557764: pcmanfm-1.0 segfault in fm_file_info_is_image
+       access to FmThumbnailRequest is dangerous in this implementation
+       and thumbnail generator anyway respects cfg->thumbnail_max */
     if(cfg->thumbnail_max)
     {
          /* remove files which are too big from thumbnail requests
@@ -1357,6 +1361,7 @@ static void on_thumbnail_max_changed(FmConfig* cfg, gpointer user_data)
             l = next;
         }
     }
+#endif
     seq_it = g_sequence_get_begin_iter(model->items);
     while( !g_sequence_iter_is_end(seq_it) )
     {
-- 
1.7.4.1