You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2010/01/08 02:28:51 UTC

svn commit: r897074 - /spamassassin/trunk/spamc/spamc.c

Author: mmartinec
Date: Fri Jan  8 01:28:50 2010
New Revision: 897074

URL: http://svn.apache.org/viewvc?rev=897074&view=rev
Log:
Bug 6176: distinguish too long lines from non-NL-terminated (last) line
in the issued diagnostic

Modified:
    spamassassin/trunk/spamc/spamc.c

Modified: spamassassin/trunk/spamc/spamc.c
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamc/spamc.c?rev=897074&r1=897073&r2=897074&view=diff
==============================================================================
--- spamassassin/trunk/spamc/spamc.c (original)
+++ spamassassin/trunk/spamc/spamc.c Fri Jan  8 01:28:50 2010
@@ -583,8 +583,13 @@
 	    continue;
         }
 	if (option[option_l-1] != '\n') {
-	    fprintf(stderr,"Exceeded max line size (%d) in %s\n",
-                    CONFIG_MAX_LINE_SIZE-2, config_file);
+	    if (option_l < CONFIG_MAX_LINE_SIZE-1) {
+	        fprintf(stderr,"Line not terminated with a newline in %s\n",
+                        config_file);
+	    } else {
+	        fprintf(stderr,"Exceeded max line size (%d) in %s\n",
+                        CONFIG_MAX_LINE_SIZE-2, config_file);
+	    }
 	    return EX_CONFIG;
 	}