Gitweb:
https://git.exim.org/exim.git/commitdiff/5e4fd0533c99c75cb27137ab469e2ce1e3efaf72
Commit: 5e4fd0533c99c75cb27137ab469e2ce1e3efaf72
Parent: a06ffc5a1b1a49e0e8cd6522ce5a005948333458
Author: Heiko Schlittermann (HS12-RIPE) <hs@???>
AuthorDate: Mon Mar 29 22:44:47 2021 +0200
Committer: Heiko Schlittermann (HS12-RIPE) <hs@???>
CommitDate: Thu May 27 21:30:47 2021 +0200
CVE-2020-28013: Heap buffer overflow in parse_fix_phrase()
Based on Phil Pennock's 8a50c88a, done by Qualys
(cherry picked from commit 8161c16ec7320ac6164954bade23179a0ed095eb)
(cherry picked from commit 71585e8fcb8704a9f431f5a8d019280cccaad069)
---
src/src/parse.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/src/parse.c b/src/src/parse.c
index cfc1f99..e0470c8 100644
--- a/src/src/parse.c
+++ b/src/src/parse.c
@@ -1134,12 +1134,7 @@ while (s < end)
{
if (ss >= end) ss--;
*t++ = '(';
- if (ss < s)
- {
- /* Someone has ended the string with "<punct>(". */
- ss = s;
- }
- else
+ if (ss > s)
{
Ustrncpy(t, s, ss-s);
t += ss-s;