From: Jeremy Harris Date: Tue, 24 Nov 2020 22:11:09 +0000 (+0000) Subject: ARC: harden parsing of signing spec. Bug 2639 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/29041f6cd4b0d8a0ee109ed0a0efaaf929d6a804 ARC: harden parsing of signing spec. Bug 2639 --- diff --git a/src/src/arc.c b/src/src/arc.c index 061731280..c1407af60 100644 --- a/src/src/arc.c +++ b/src/src/arc.c @@ -1607,10 +1607,10 @@ expire = now = 0; /* Parse the signing specification */ -identity = string_nextinlist(&signspec, &sep, NULL, 0); -selector = string_nextinlist(&signspec, &sep, NULL, 0); -if ( !*identity || !*selector - || !(privkey = string_nextinlist(&signspec, &sep, NULL, 0)) || !*privkey) +if ( !(identity = string_nextinlist(&signspec, &sep, NULL, 0)) || !*identity + || !(selector = string_nextinlist(&signspec, &sep, NULL, 0)) || !*selector + || !(privkey = string_nextinlist(&signspec, &sep, NULL, 0)) || !*privkey + ) { s = !*identity ? US"identity" : !*selector ? US"selector" : US"private-key"; goto bad_arg_ret;