From: Heiko Schlittermann (HS12-RIPE) Date: Mon, 29 Mar 2021 20:44:47 +0000 (+0200) Subject: CVE-2020-28013: Heap buffer overflow in parse_fix_phrase() X-Git-Tag: exim-4.94.1~19 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/71585e8fcb8704a9f431f5a8d019280cccaad069 CVE-2020-28013: Heap buffer overflow in parse_fix_phrase() Based on Phil Pennock's 8a50c88a, done by Qualys (cherry picked from commit 8161c16ec7320ac6164954bade23179a0ed095eb) --- diff --git a/src/src/parse.c b/src/src/parse.c index 3f1ba222f..32b42cd29 100644 --- a/src/src/parse.c +++ b/src/src/parse.c @@ -1129,12 +1129,7 @@ while (s < end) { if (ss >= end) ss--; *t++ = '('; - if (ss < s) - { - /* Someone has ended the string with "(". */ - ss = s; - } - else + if (ss > s) { Ustrncpy(t, s, ss-s); t += ss-s;