Re: [evolution-patches] Patch for 52378: all new mail marked as spam



On Sun, 2004-01-04 at 19:12, Not Zed wrote:
> looks reasonable at first glance,  but please submit following the
> guidelines in the HACKING file.  Particularly, it must include a
> ChangeLog and should be in unified diff format.

Ah; sorry; here it is again..
~~~~~~~~~~~~~~~~~~~~
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2964
diff -u -p -r1.2964 ChangeLog
--- ChangeLog   22 Dec 2003 14:50:56 -0000      1.2964
+++ ChangeLog   5 Jan 2004 01:46:36 -0000
@@ -1,3 +1,11 @@
+2004-01-04  Frank Solensky  <frank solensky org>
+
+       * em-junk-filter.c (em_junk_sa_test_spamd_running),
+       (em_junk_sa_test_spamd), (em_junk_sa_check_junk),
+       (em_junk_sa_report_junk), (em_junk_sa_report_notjunk),
+       (em_junk_sa_commit_reports): Fixes #52378: vector passed to
+       execvp() must be NULL-terminated.
+
 2003-12-22  David Moore  <davmre bellsouth net>
    
        * em-popup.c (emp_part_popup_set_background): Implemented; sets an
Index: em-junk-filter.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-junk-filter.c,v
retrieving revision 1.4
diff -u -p -r1.4 em-junk-filter.c
--- em-junk-filter.c    13 Nov 2003 11:33:26 -0000      1.4
+++ em-junk-filter.c    5 Jan 2004 01:46:36 -0000
@@ -166,9 +166,10 @@ pipe_to_sa (CamelMimeMessage *msg, gchar
 static int
 em_junk_sa_test_spamd_running (gint port)
 {
-       static gchar *sac_args [3] = {
+       static gchar *sac_args [4] = {
                "/bin/sh",
                "-c",
+               NULL,
                NULL
        };
        int retval;
@@ -176,7 +177,7 @@ em_junk_sa_test_spamd_running (gint port
        d(fprintf (stderr, "test if spamd is running (port %d)\n", port);)
        sac_args [2] = port > 0  ? g_strdup_printf ("spamc -x -p %d", port) : g_strdup_printf ("spamc -x");
  
-       retval = pipe_to_sa (NULL, "From test 127 0 0 1", 3, sac_args) == 0;
+       retval = pipe_to_sa (NULL, "From test 127 0 0 1", 1, sac_args) == 0;
        g_free (sac_args [2]);
  
        return retval;
@@ -186,10 +187,11 @@ static void
 em_junk_sa_test_spamd ()
 {
        gint i, port = 7830;
-       static gchar *args [3] = {
+       static gchar *args [4] = {
                "/bin/sh",
                "-c",
-               "spamassassin --version"
+               "spamassassin --version",
+               NULL
        };
  
        if (pipe_to_sa (NULL, NULL, 3, args))
@@ -213,9 +215,10 @@ em_junk_sa_test_spamd ()
                /* } */
  
                if (!em_junk_sa_use_spamc) {
-                       static gchar *sad_args [3] = {
+                       static gchar *sad_args [4] = {
                                "/bin/sh",
                                "-c",
+                               NULL,
                                NULL
                        };
                        gint i, port = 7830;
@@ -258,15 +261,15 @@ em_junk_sa_is_available ()
 static gboolean
 em_junk_sa_check_junk (CamelMimeMessage *msg)
 {
-       static gchar *args [3] = {
+       static gchar *args [4] = {
                "/bin/sh",
                "-c",
+               NULL,
                NULL
        };
        gint retval;
  
        d(fprintf (stderr, "em_junk_sa_check_junk\n"));
-
        if (!em_junk_sa_is_available ())
                return FALSE;
  
@@ -293,14 +296,15 @@ em_junk_sa_check_junk (CamelMimeMessage
 static void
 em_junk_sa_report_junk (CamelMimeMessage *msg)
 {
-       static gchar *args [3] = {
+       static gchar *args [4] = {
                "/bin/sh",
                "-c",
                "sa-learn"
                " --no-rebuild"        /* do not rebuild db */
                " --spam"              /* report junk */
                " --single"            /* single message */
-               " --local"             /* local only */
+               " --local",            /* local only */
+               NULL
        };
  
        d(fprintf (stderr, "em_junk_sa_report_junk\n"));
@@ -312,14 +316,15 @@ em_junk_sa_report_junk (CamelMimeMessage
 static void
 em_junk_sa_report_notjunk (CamelMimeMessage *msg)
 {
-       static gchar *args [3] = {
+       static gchar *args [4] = {
                "/bin/sh",
                "-c",
                "sa-learn"
                " --no-rebuild"        /* do not rebuild db */
                " --ham"               /* report notjunk */
                " --single"            /* single message */
-               " --local"             /* local only */
+               " --local",            /* local only */
+               NULL
        };
  
        d(fprintf (stderr, "em_junk_sa_report_notjunk\n"));
@@ -331,12 +336,13 @@ em_junk_sa_report_notjunk (CamelMimeMess
 static void
 em_junk_sa_commit_reports (void)
 {
-       static gchar *args [3] = {
+       static gchar *args [4] = {
                "/bin/sh",
                "-c",
                "sa-learn"
                " --rebuild"           /* do not rebuild db */
-               " --local"             /* local only */
+               " --local",            /* local only */
+               NULL
        };
  
        d(fprintf (stderr, "em_junk_sa_commit_reports\n");)





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]