30 lines
1002 B
Plaintext
30 lines
1002 B
Plaintext
$OpenBSD: patch-src_fr-command-7z_c,v 1.1 2008/11/23 00:11:18 jasper Exp $
|
|
|
|
Fix a crasher possible with 7z files.
|
|
|
|
--- src/fr-command-7z.c.orig Sun Nov 23 01:01:39 2008
|
|
+++ src/fr-command-7z.c Sun Nov 23 01:05:32 2008
|
|
@@ -125,13 +125,15 @@ list__process_line (char *line,
|
|
if (strcmp (line, "") == 0) {
|
|
if (p7z_comm->fdata != NULL) {
|
|
fdata = p7z_comm->fdata;
|
|
- if (fdata->dir)
|
|
- fdata->name = dir_name_from_path (fdata->full_path);
|
|
- else
|
|
- fdata->name = g_strdup (file_name_from_path (fdata->full_path));
|
|
- fdata->path = remove_level_from_path (fdata->full_path);
|
|
- fr_command_add_file (comm, fdata);
|
|
- p7z_comm->fdata = NULL;
|
|
+ if (fdata->full_path) {
|
|
+ if (fdata->dir)
|
|
+ fdata->name = dir_name_from_path (fdata->full_path);
|
|
+ else
|
|
+ fdata->name = g_strdup (file_name_from_path (fdata->full_path));
|
|
+ fdata->path = remove_level_from_path (fdata->full_path);
|
|
+ fr_command_add_file (comm, fdata);
|
|
+ p7z_comm->fdata = NULL;
|
|
+ }
|
|
}
|
|
return;
|
|
}
|