summaryrefslogtreecommitdiff
path: root/mail-client/nmh/files/nmh-1.6-m_getfld.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mail-client/nmh/files/nmh-1.6-m_getfld.patch')
-rw-r--r--mail-client/nmh/files/nmh-1.6-m_getfld.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/mail-client/nmh/files/nmh-1.6-m_getfld.patch b/mail-client/nmh/files/nmh-1.6-m_getfld.patch
new file mode 100644
index 000000000000..36f207796646
--- /dev/null
+++ b/mail-client/nmh/files/nmh-1.6-m_getfld.patch
@@ -0,0 +1,25 @@
+--- nmh-1.6/sbr/m_getfld.c
++++ nmh-1.6/sbr/m_getfld.c
+@@ -919,16 +919,16 @@
+ 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 --str;
++ return ((unsigned char *)str);
+ }
++ return 0;
+ }