From b4dd15a736795e6d06a79febbae76a926964bbb0 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 27 Apr 2019 13:22:52 +0100 Subject: [PATCH] ARC: harden against malformed headers --- src/src/arc.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.30.2