procmail/procmail-3.22-CVE-2014-3618.patch
Jaroslav Škarvada 5f06bcd0a9 Fixed buffer overflow in formail
Resolves: CVE-2014-3618
2014-09-04 16:12:28 +02:00

19 lines
521 B
Diff

diff --git a/src/formisc.c b/src/formisc.c
index 338733b..c48df52 100644
--- a/src/formisc.c
+++ b/src/formisc.c
@@ -84,12 +84,11 @@ normal: *target++= *start++;
case '"':*target++=delim='"';start++;
}
;{ int i;
- do
+ while(*start) /* anything? */
if((i= *target++= *start++)==delim) /* corresponding delimiter? */
break;
else if(i=='\\'&&*start) /* skip quoted character */
*target++= *start++;
- while(*start); /* anything? */
}
hitspc=2;
}