summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-07-21 17:14:12 +0300
committerMonsta <[email protected]>2015-07-21 17:14:12 +0300
commit37a0b6b09d8befd5b2b5a22093a6c18b5f2fb5a1 (patch)
tree05c6ab40130a02ca4bcdf2b251f04c95cab8a2eb
parente463f7cce8f1164ff18c2ac748113e92c329d102 (diff)
downloadengrampa-37a0b6b09d8befd5b2b5a22093a6c18b5f2fb5a1.tar.bz2
engrampa-37a0b6b09d8befd5b2b5a22093a6c18b5f2fb5a1.tar.xz
fr-command-rar: additional check for NULL pointer to avoid crash
adapted from https://github.com/GNOME/file-roller/commit/8c55a4118dc83f171ca89407492269ecfe0a20d3
-rw-r--r--src/fr-command-rar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fr-command-rar.c b/src/fr-command-rar.c
index 2aa0eee..31c95c1 100644
--- a/src/fr-command-rar.c
+++ b/src/fr-command-rar.c
@@ -152,6 +152,9 @@ parse_name_field (char *line,
else
name_field = g_strdup (line + 1);
+ if (name_field == NULL)
+ return;
+
if (*name_field == '/') {
fdata->full_path = g_strdup (name_field);
fdata->original_path = fdata->full_path;