diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2019-04-27 13:22:52 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2019-04-27 13:22:52 +0100 |
commit | b4dd15a736795e6d06a79febbae76a926964bbb0 (patch) | |
tree | 3fd2dc91a518509d546d4aca3a36b5c2202c1ac0 /src | |
parent | d6e81e5fbdb2608edbf5a3c12ee09433ea07ecda (diff) |
ARC: harden against malformed headers
Diffstat (limited to 'src')
-rw-r--r-- | src/src/arc.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |