summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2012-08-22 12:04:16 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2012-09-06 19:58:38 +0200
commitb47b716da8eafb2e28d1a416b00fdbc17d40bfff (patch)
treef53becc8cc362d997e3c61a982e74d762258fe59
parenta2cc010644ff6fb261b2c76f7ec0c7b5b27c638c (diff)
Check for NULL string in sanitize_path
sanitize_path is not NULL safe and passing it NULL indicates an error somewhere as you probably don't want empty path elements. https://bugzilla.gnome.org/show_bug.cgi?id=661646
-rw-r--r--src/sj-extracting.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sj-extracting.c b/src/sj-extracting.c
index 6b10757..77871d5 100644
--- a/src/sj-extracting.c
+++ b/src/sj-extracting.c
@@ -862,6 +862,8 @@ sanitize_path (const char* str, const char* filesystem_type)
gchar *res = NULL;
gchar *s;
+ g_return_val_if_fail (str != NULL, NULL);
+
/* Skip leading periods, otherwise files disappear... */
while (*str == '.')
str++;