From: Ruud de Rooij Date: Sun, 28 May 2000 12:45:53 +0000 (+0000) Subject: Fixed m_getfld bug which caused segmentation faults when X-Git-Tag: kim-before-sasl~25 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=e1aadb9e23f706d4b19f49d1e7a6995a5b3c59e2;p=mmh Fixed m_getfld bug which caused segmentation faults when incorporating messages which ended in multiple linefeeds crossing a buffer boundary. --- diff --git a/ChangeLog b/ChangeLog index a651862..be7e10f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun May 28 14:39:31 CEST 2000 Ruud de Rooij + + * Fixed m_getfld bug which caused segmentation faults when + incorporating messages which ended in multiple linefeeds crossing + a buffer boundary. + Fri May 26 13:21:59 2000 Dan Harkless * msh has been unable to show MIME messages ever since 1.0. Alec diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index beb6e76..a667be8 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -730,7 +730,8 @@ matchc(int patln, char *pat, int strln, char *str) while (pc != *str++) if (str > es) return 0; - + if (str > es+1) + return 0; sp = str; pp = pat; while (pp < ep && *sp++ == *pp) pp++;