From: Paul Dreik Date: Mon, 23 Sep 2019 11:10:12 +0000 (+0200) Subject: doh: return early if there is no time left X-Git-Tag: curl-7_67_0~135 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb7420180497f6087cd2d894253beb2532a0569e;p=thirdparty%2Fcurl.git doh: return early if there is no time left Closes #4406 --- diff --git a/lib/doh.c b/lib/doh.c index 5a76d6d873..05a6cc2357 100644 --- a/lib/doh.c +++ b/lib/doh.c @@ -240,7 +240,10 @@ static CURLcode dohprobe(struct Curl_easy *data, } timeout_ms = Curl_timeleft(data, NULL, TRUE); - + if(timeout_ms <= 0) { + result = CURLE_OPERATION_TIMEDOUT; + goto error; + } /* Curl_open() is the internal version of curl_easy_init() */ result = Curl_open(&doh); if(!result) {