diff options
author | Werner Koch <[email protected]> | 2014-12-22 11:29:32 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-12-22 11:39:14 +0000 |
commit | 0d5cb55402c44fb5f731ecf85705f845f3091aa7 (patch) | |
tree | 68db985468ad35b443f134851018657cdba7aa28 /dirmngr/crlfetch.c | |
parent | dirmngr,gpgsm: Return NULL on fail (diff) | |
download | gnupg-0d5cb55402c44fb5f731ecf85705f845f3091aa7.tar.gz gnupg-0d5cb55402c44fb5f731ecf85705f845f3091aa7.zip |
dirmngr: Remove un-needed check.
* dirmngr/crlfetch.c (crl_fetch): Check that URL is not NULL.
--
Reported-by: Joshua Rogers <[email protected]>
"Remove un-needed check. If 'url' were not to be true,
http_parse_uri(parse_uri(do_parse_uri))) would fail, leaving 'err'
false."
In addition I added an explicit check for the URL arg not beeing NULL.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/crlfetch.c')
-rw-r--r-- | dirmngr/crlfetch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dirmngr/crlfetch.c b/dirmngr/crlfetch.c index 2471ca2f0..2c4a24783 100644 --- a/dirmngr/crlfetch.c +++ b/dirmngr/crlfetch.c @@ -163,10 +163,13 @@ crl_fetch (ctrl_t ctrl, const char *url, ksba_reader_t *reader) *reader = NULL; + if (!url) + return gpg_error (GPG_ERR_INV_ARG); + once_more: err = http_parse_uri (&uri, url, 0); http_release_parsed_uri (uri); - if (err && url && !strncmp (url, "https:", 6)) + if (err && !strncmp (url, "https:", 6)) { /* Our HTTP code does not support TLS, thus we can't use this scheme and it is frankly not useful for CRL retrieval anyway. |