File: 31.patch

package info (click to toggle)
procmail 3.24%2Breally3.22-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,380 kB
  • sloc: ansic: 9,888; sh: 1,920; makefile: 105
file content (19 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
From: Stephen R. van den Berg <srb@cuci.nl>
Subject: Cater for mails containing an incomplete From_ line.
Bug-Debian: https://bugs.debian.org/769938
X-Debian-version: 3.22-27

--- a/src/from.c
+++ b/src/from.c
@@ -117,7 +117,10 @@
 	      themail.p[extra]='\0';		  /* terminate it for strchr */
 	    }
 	   while(!(rstart=strchr(themail.p,'\n')));
-	   extra=rstart?extra-(++rstart-themail.p):0;
+	   if (rstart)
+	     extra -= ++rstart - themail.p;
+	   else
+	     extra = 0, rstart = themail.p;
 	 }
 	else
 	 { size_t tfrl= ++rstart-themail.p; /* length of existing From_ line */