~ubuntu-branches/debian/sid/file-roller/sid

« back to all changes in this revision

Viewing changes to debian/patches/01_rar_crasher.patch

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Josselin Mouette, Michael Biebl
  • Date: 2011-10-13 22:43:53 UTC
  • mfrom: (5.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20111013224353-7fub412oa8jwkcgt
Tags: 3.0.2-2
[ Josselin Mouette ]
* file-roller.mime: dropped. We don’t do necromancy anymore.
* Drop desktop-check-mime-types call too.

[ Michael Biebl ]
* Upload to unstable.
* debian/control.in:
  - Set pkg-gnome-maintainers@lists.alioth.debian.org as Maintainer.
* debian/watch:
  - Switch to .xz tarballs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From bac5d03a29a411c79e0d838d48c404900d30066d Mon Sep 17 00:00:00 2001
2
 
From: Paolo Bacchilega <paobac@src.gnome.org>
3
 
Date: Fri, 25 Jun 2010 10:45:32 +0000
4
 
Subject: [rar] fixed seg fault when there is an extra info line in the output
5
 
 
6
 
---
7
 
diff --git a/src/fr-command-rar.c b/src/fr-command-rar.c
8
 
index 482ab57..2c42ba4 100644
9
 
--- a/src/fr-command-rar.c
10
 
+++ b/src/fr-command-rar.c
11
 
@@ -117,6 +117,59 @@ process_line (char     *line,
12
 
                return;
13
 
        }
14
 
 
15
 
+       if (! rar_comm->odd_line) {
16
 
+               FileData *fdata;
17
 
+
18
 
+               fdata = rar_comm->fdata;
19
 
+
20
 
+               /* read file info. */
21
 
+
22
 
+               fields = split_line (line, 6);
23
 
+               if (g_strv_length (fields) < 6) {
24
 
+                       /* wrong line format, treat this line as a filename line */
25
 
+                       g_strfreev (fields);
26
 
+                       file_data_free (rar_comm->fdata);
27
 
+                       rar_comm->fdata = NULL;
28
 
+                       rar_comm->odd_line = TRUE;
29
 
+               }
30
 
+               else {
31
 
+                       if ((strcmp (fields[2], "<->") == 0)
32
 
+                           || (strcmp (fields[2], "<--") == 0))
33
 
+                       {
34
 
+                               /* ignore files that span more volumes */
35
 
+
36
 
+                               file_data_free (rar_comm->fdata);
37
 
+                               rar_comm->fdata = NULL;
38
 
+                       }
39
 
+                       else {
40
 
+                               fdata->size = g_ascii_strtoull (fields[0], NULL, 10);
41
 
+                               fdata->modified = mktime_from_string (fields[3], fields[4]);
42
 
+
43
 
+                               if ((fields[5][1] == 'D') || (fields[5][0] == 'd')) {
44
 
+                                       char *tmp;
45
 
+
46
 
+                                       tmp = fdata->full_path;
47
 
+                                       fdata->full_path = g_strconcat (fdata->full_path, "/", NULL);
48
 
+
49
 
+                                       fdata->original_path = g_strdup (fdata->original_path);
50
 
+                                       fdata->free_original_path = TRUE;
51
 
+
52
 
+                                       g_free (tmp);
53
 
+
54
 
+                                       fdata->name = dir_name_from_path (fdata->full_path);
55
 
+                                       fdata->dir = TRUE;
56
 
+                               }
57
 
+                               else
58
 
+                                       fdata->name = g_strdup (file_name_from_path (fdata->full_path));
59
 
+
60
 
+                               fr_command_add_file (comm, fdata);
61
 
+                               rar_comm->fdata = NULL;
62
 
+                       }
63
 
+
64
 
+                       g_strfreev (fields);
65
 
+               }
66
 
+       }
67
 
+
68
 
        if (rar_comm->odd_line) {
69
 
                FileData *fdata;
70
 
 
71
 
@@ -141,48 +194,7 @@ process_line (char     *line,
72
 
                fdata->path = remove_level_from_path (fdata->full_path);
73
 
        }
74
 
        else {
75
 
-               FileData *fdata;
76
 
-
77
 
-               fdata = rar_comm->fdata;
78
 
-
79
 
-               /* read file info. */
80
 
-
81
 
-               fields = split_line (line, 6);
82
 
-
83
 
-               if ((strcmp (fields[2], "<->") == 0)
84
 
-                   || (strcmp (fields[2], "<--") == 0))
85
 
-               {
86
 
-                       /* ignore files that span more volumes */
87
 
-
88
 
-                       file_data_free (rar_comm->fdata);
89
 
-                       rar_comm->fdata = NULL;
90
 
-               }
91
 
-               else {
92
 
-                       fdata->size = g_ascii_strtoull (fields[0], NULL, 10);
93
 
-                       fdata->modified = mktime_from_string (fields[3], fields[4]);
94
 
-
95
 
-                       if ((fields[5][1] == 'D') || (fields[5][0] == 'd')) {
96
 
-                               char *tmp;
97
 
-
98
 
-                               tmp = fdata->full_path;
99
 
-                               fdata->full_path = g_strconcat (fdata->full_path, "/", NULL);
100
 
-
101
 
-                               fdata->original_path = g_strdup (fdata->original_path);
102
 
-                               fdata->free_original_path = TRUE;
103
 
-
104
 
-                               g_free (tmp);
105
 
-
106
 
-                               fdata->name = dir_name_from_path (fdata->full_path);
107
 
-                               fdata->dir = TRUE;
108
 
-                       }
109
 
-                       else
110
 
-                               fdata->name = g_strdup (file_name_from_path (fdata->full_path));
111
 
-
112
 
-                       fr_command_add_file (comm, fdata);
113
 
-                       rar_comm->fdata = NULL;
114
 
-               }
115
 
 
116
 
-               g_strfreev (fields);
117
 
        }
118
 
 
119
 
        rar_comm->odd_line = ! rar_comm->odd_line;
120
 
--
121
 
cgit v0.8.3.1