Blob Blame Raw
From d2572a98f41df96534f41062b0020ee6a10047ea Mon Sep 17 00:00:00 2001
Message-Id: <d2572a98f41df96534f41062b0020ee6a10047ea.1315927751.git.npajkovs@redhat.com>
From: Martin Milata <mmilata@redhat.com>
Date: Tue, 26 Jul 2011 16:49:28 +0200
Subject: [PATCH] a-a-save-package-data: Fix NULL dereference

Fixes #324.
---
 src/daemon/abrt-action-save-package-data.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c
index d37a05d..ddcf4ac 100644
--- a/src/daemon/abrt-action-save-package-data.c
+++ b/src/daemon/abrt-action-save-package-data.c
@@ -160,7 +160,7 @@ static char *get_argv1_if_full_path(const char* cmdline)
      * with '/', it is not a full path to script
      * and we can't use it to determine the package name
      */
-    if (*argv1 != '/')
+    if (argv1 == NULL || *argv1 != '/')
         return NULL;
 
     /* good, it has "/foo/bar" form, return it */
-- 
1.7.7.rc0.70.g82660