[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] line length limit in ct_check plugin
- To: unlisted-recipients:; (no To-header on input)
- Subject: [PATCH] line length limit in ct_check plugin
- From: acli@ada.dhs.org (Ambrose LI)
- Date: Wed, 28 Jan 2004 20:01:05 GMT
- Distribution: local
- Newsgroups: local.mailgate.zmailer
- Organization: somewhere in Scarborough, Canada running C News CR.G and some assorted hacks for NNTP (including a hacked nntpxmit derived from NNTP 1.5.12)
- Original-Recipient: rfc822;zmailer-log@nic.funet.fi
- References: <20040128132135.A5779@ada.dhs.org>
- Sender: zmailer-owner@nic.funet.fi
I was checking the wrong .c file. I have now patched pcre.c
with the following patch. This might be useful for others.
--- pcre.c.dist Fri Sep 19 11:59:20 2003
+++ pcre.c Wed Jan 28 14:47:40 2004
@@ -71,8 +71,8 @@
{
struct _cfg **cfgp=(struct _cfg **)priv;
int rc,count=0;
- char buf[128];
- char fbuf[128];
+ char buf[512];
+ char fbuf[512];
FILE *fp;
int options;
char *eob,*p,*q,*re,*comm;
@@ -91,6 +91,11 @@
}
while (fgets(buf,sizeof(buf),fp)) {
count++;
+ if (buf[0] && buf[strlen(buf)-1] != '\n') {
+ ERRLOG((LOG_ERR,
+ "pcre: %d(%d): Line too long",fbuf,count));
+ return 1;
+ }
if (buf[0] == '#') continue;
buf[sizeof(buf)-1]='\0';
p=buf+strlen(buf)-1;
--
Ambrose LI Cheuk-Wing <a.c.li@ieee.org>
http://ada.dhs.org/~acli/
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi