From: Jeremy Harris Date: Sat, 27 Apr 2019 12:22:52 +0000 (+0100) Subject: ARC: harden against malformed headers X-Git-Tag: exim-4.93-RC0~216 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/b4dd15a736795e6d06a79febbae76a926964bbb0 ARC: harden against malformed headers --- diff --git a/src/src/arc.c b/src/src/arc.c index 6c4bcc641..e7ebb9719 100644 --- a/src/src/arc.c +++ b/src/src/arc.c @@ -260,6 +260,7 @@ while ((c = *s)) while ((c = *++s) && c != ';') if (c != ' ' && c != '\t' && c != '\n' && c != '\r') g = string_catn(g, s, 1); + if (!g) return US"no b= value"; al->b.data = string_from_gstring(g); al->b.len = g->ptr; gstring_reset_unused(g); @@ -276,6 +277,7 @@ while ((c = *s)) while ((c = *++s) && c != ';') if (c != ' ' && c != '\t' && c != '\n' && c != '\r') g = string_catn(g, s, 1); + if (!g) return US"no bh= value"; al->bh.data = string_from_gstring(g); al->bh.len = g->ptr; gstring_reset_unused(g);