From 80a327f139d1a18e80d7c95d61e3eead69ca57ee Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Sun, 14 Sep 2008 15:12:55 +0000 Subject: Milan Crha ** Fix for bug #505016 (Check for NULL to prevent crash when error occurred). svn path=/trunk/; revision=36327 --- plugins/sa-junk-plugin/ChangeLog | 7 +++++++ plugins/sa-junk-plugin/em-junk-filter.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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 + + ** 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 ** 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); -- cgit v1.2.3