[exim-cvs] ARC: harden parsing of signing spec. Bug 2639

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Exim Git Commits Mailing List
日付:  
To: exim-cvs
題目: [exim-cvs] ARC: harden parsing of signing spec. Bug 2639
Gitweb: https://git.exim.org/exim.git/commitdiff/29041f6cd4b0d8a0ee109ed0a0efaaf929d6a804
Commit:     29041f6cd4b0d8a0ee109ed0a0efaaf929d6a804
Parent:     5afd7bb856bf4841ae9cd24bb9cf7b47ff68897d
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Tue Nov 24 22:11:09 2020 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Tue Nov 24 22:11:09 2020 +0000


    ARC: harden parsing of signing spec.  Bug 2639
---
 src/src/arc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


diff --git a/src/src/arc.c b/src/src/arc.c
index 0617312..c1407af 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;