apple-sectrust: check ocsp copy alloc
No binary (build failed)
—
(log yok)
| @@ -204,7 +204,10 @@ CURLcode Curl_vtls_apple_verify(struct Curl_cfilter *cf, | |
| #if defined(HAVE_BUILTIN_AVAILABLE) && defined(SUPPORTS_SecOCSP) | |
| if(__builtin_available(macOS 10.9, iOS 7, tvOS 9, watchOS 2, *)) { | |
| CFDataRef ocspdata = CFDataCreate(NULL, ocsp_buf, (CFIndex)ocsp_len); | |
| - | |
| + | if(!ocspdata) { |
| + | result = CURLE_OUT_OF_MEMORY; |
| + | goto out; |
| + | } |
| status = SecTrustSetOCSPResponse(trust, ocspdata); | |
| CFRelease(ocspdata); | |
| if(status != noErr) { | |