When converting an OCSP request's information into base64, the return
value of a2base64 is checked but processing is not interrupted when it
returns a negative value, which was caught by coverity.
This patch fixes GitHub issue #1974.
It does not need to be backported.
goto end;
}
- errcode = 0;
-
/* HTTP based OCSP requests can use either the GET or the POST method to
* submit their requests. To enable HTTP caching, small requests (that
* after encoding are less than 255 bytes), MAY be submitted using GET.
if (base64_ret < 0) {
memprintf(err, "%sa2base64() error\n", *err ? *err : "");
+ goto end;
}
b64buf->data = base64_ret;
query_encode_map, b64buf);
if (ret && *ret == '\0') {
req_url->data = ret - b_orig(req_url);
+ errcode = 0;
}
}
else {
chunk_cpy(req_body, bin_request);
+ errcode = 0;
}
+
end:
OCSP_REQUEST_free(ocsp);