[Pkg-wmaker-commits] [wmbiff] 12/17: handle capitalized FROM and SUBJECT headers common typical of spam spam spam

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:04:21 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to tag wmbiff_0_4_18
in repository wmbiff.

commit c4c9300d0453b4f8145e3d0f4666fb6f2fd6934a
Author: bluehal <bluehal>
Date:   Wed Oct 29 18:17:08 2003 +0000

    handle capitalized FROM and SUBJECT headers common typical of spam spam spam
---
 wmbiff/Imap4Client.c | 1 +
 wmbiff/Pop3Client.c  | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/wmbiff/Imap4Client.c b/wmbiff/Imap4Client.c
index 2500846..85851b4 100644
--- a/wmbiff/Imap4Client.c
+++ b/wmbiff/Imap4Client.c
@@ -25,6 +25,7 @@
 #include <errno.h>
 #include <time.h>
 #include <ctype.h>
+#include <strings.h>
 
 #ifdef USE_DMALLOC
 #include <dmalloc.h>
diff --git a/wmbiff/Pop3Client.c b/wmbiff/Pop3Client.c
index 9e1db53..e29e57e 100644
--- a/wmbiff/Pop3Client.c
+++ b/wmbiff/Pop3Client.c
@@ -1,4 +1,4 @@
-/* $Id: Pop3Client.c,v 1.18 2003/10/26 08:31:59 bluehal Exp $ */
+/* $Id: Pop3Client.c,v 1.19 2003/10/29 18:17:08 bluehal Exp $ */
 /* Author : Scott Holden ( scotth at thezone.net )
    Modified : Yong-iL Joh ( tolkien at mizi.com )
    Modified : Jorge Garc�a ( Jorge.Garcia at uv.es )
@@ -18,6 +18,7 @@
 #include "charutil.h"
 #include "regulo.h"
 #include "MessageList.h"
+#include <strings.h>
 
 #ifdef USE_DMALLOC
 #include <dmalloc.h>
@@ -421,11 +422,11 @@ void pop3_cacheHeaders( /*@notnull@ */ Pop3 pc)
 		fprintf(f, "TOP %i 0\r\n", i);
 		fflush(f);
 		while (fgets(buf, 256, f) && buf[0] != '.') {
-			if (!strncmp(buf, "From: ", 6)) {
+			if (!strncasecmp(buf, "From: ", 6)) {
 				/* manage the from in heads */
 				strncpy(m->from, buf + 6, FROM_LEN - 1);
 				m->from[FROM_LEN - 1] = '\0';
-			} else if (!strncmp(buf, "Subject: ", 9)) {
+			} else if (!strncasecmp(buf, "Subject: ", 9)) {
 				/* manage subject */
 				strncpy(m->subj, buf + 9, SUBJ_LEN - 1);
 				m->subj[SUBJ_LEN - 1] = '\0';

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git



More information about the Pkg-wmaker-commits mailing list