summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-11-24 22:11:09 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2020-11-24 22:11:09 +0000
commit29041f6cd4b0d8a0ee109ed0a0efaaf929d6a804 (patch)
tree44bec1b3db80e7fdff99d7bab93b001259c93dc0
parent5afd7bb856bf4841ae9cd24bb9cf7b47ff68897d (diff)
ARC: harden parsing of signing spec. Bug 2639
-rw-r--r--src/src/arc.c8
1 files changed, 4 insertions, 4 deletions
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;