From 5e4fd0533c99c75cb27137ab469e2ce1e3efaf72 Mon Sep 17 00:00:00 2001 From: "Heiko Schlittermann (HS12-RIPE)" Date: Mon, 29 Mar 2021 22:44:47 +0200 Subject: [PATCH] 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 cfc1f996f..e0470c86f 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 "(". */ - ss = s; - } - else + if (ss > s) { Ustrncpy(t, s, ss-s); t += ss-s; -- 2.30.2