Jiri Moskovcak 2194a11
commit d2572a98f41df96534f41062b0020ee6a10047ea
Jiri Moskovcak 2194a11
Author: Martin Milata <mmilata@redhat.com>
Jiri Moskovcak 2194a11
Date:   Tue Jul 26 16:49:28 2011 +0200
Jiri Moskovcak 2194a11
Jiri Moskovcak 2194a11
    a-a-save-package-data: Fix NULL dereference
Jiri Moskovcak 2194a11
    
Jiri Moskovcak 2194a11
    Fixes #324.
Jiri Moskovcak 2194a11
Jiri Moskovcak 2194a11
diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c
Jiri Moskovcak 2194a11
index d37a05d..ddcf4ac 100644
Jiri Moskovcak 2194a11
--- a/src/daemon/abrt-action-save-package-data.c
Jiri Moskovcak 2194a11
+++ b/src/daemon/abrt-action-save-package-data.c
Jiri Moskovcak 2194a11
@@ -160,7 +160,7 @@ static char *get_argv1_if_full_path(const char* cmdline)
Jiri Moskovcak 2194a11
      * with '/', it is not a full path to script
Jiri Moskovcak 2194a11
      * and we can't use it to determine the package name
Jiri Moskovcak 2194a11
      */
Jiri Moskovcak 2194a11
-    if (*argv1 != '/')
Jiri Moskovcak 2194a11
+    if (argv1 == NULL || *argv1 != '/')
Jiri Moskovcak 2194a11
         return NULL;
Jiri Moskovcak 2194a11
 
Jiri Moskovcak 2194a11
     /* good, it has "/foo/bar" form, return it */