[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-workers] m_getfld() patch
From: |
Anders Eriksson |
Subject: |
[Nmh-workers] m_getfld() patch |
Date: |
Tue, 08 Apr 2008 08:59:18 +0200 |
In case there's a new release soon...
Gentoo carries this patch, which applies cleanly, but I have no idea what it
does.
Review? Apply? Pile of crap?
/Anders
--- sbr/m_getfld.orig.c 2004-07-25 13:18:04.570397179 -0700
+++ sbr/m_getfld.c 2004-07-25 13:25:36.471839770 -0700
@@ -730,18 +730,18 @@
register char *ep = pat + patln;
register char pc = *pat++;
- for(;;) {
- while (pc != *str++)
- if (str > es)
- return 0;
+ for(;str <= es; str++) {
+ if (pc != *str)
+ continue;
if (str > es+1)
return 0;
- sp = str; pp = pat;
+ sp = str+1; pp = pat;
while (pp < ep && *sp++ == *pp)
pp++;
if (pp >= ep)
- return ((unsigned char *)--str);
+ return ((unsigned char *)str);
}
+ return 0;
}
- [Nmh-workers] m_getfld() patch,
Anders Eriksson <=
- Re: [Nmh-workers] m_getfld() patch, Peter Maydell, 2008/04/08
- Re: [Nmh-workers] m_getfld() patch, Josh Bressers, 2008/04/08
- Re: [Nmh-workers] m_getfld() patch, Peter Maydell, 2008/04/08
- Re: [Nmh-workers] m_getfld() patch, Anders Eriksson, 2008/04/08
- Re: [Nmh-workers] m_getfld() patch, Josh Bressers, 2008/04/08
- Re: [Nmh-workers] m_getfld() patch, Anders Eriksson, 2008/04/08
- Re: [Nmh-workers] m_getfld() patch, Anders Eriksson, 2008/04/08
- Re: [Nmh-workers] m_getfld() patch, Josh Bressers, 2008/04/08