aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sa-junk-plugin/ChangeLog7
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/plugins/sa-junk-plugin/ChangeLog b/plugins/sa-junk-plugin/ChangeLog
index 890709261a..70fa37ad47 100644
--- a/plugins/sa-junk-plugin/ChangeLog
+++ b/plugins/sa-junk-plugin/ChangeLog
@@ -1,3 +1,10 @@
+2008-09-12 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #505016
+
+ * em-junk-filter.c: (em_junk_sa_check_junk):
+ Check for NULL to prevent crash when error occurred.
+
2008-04-25 Milan Crha <mcrha@redhat.com>
** Fix for bug #273041
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index 880a7694fb..7ab8feb614 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -594,7 +594,7 @@ em_junk_sa_check_junk(EPlugin *ep, EMJunkHookTarget *target)
rv = pipe_to_sa_full (msg, NULL, argv, 0, 1, out, &target->error) != 0;
- if (!rv && out && !strcmp ((const char *)out->data, "0/0\n")) {
+ if (!rv && out && out->data && !strcmp ((const char *)out->data, "0/0\n")) {
/* an error occurred */
if (em_junk_sa_respawn_spamd ()) {
g_byte_array_set_size (out, 0);