Versions since at least 2.9.4 renamed error.h to error-ssl.h, so use whichever one is available.
gnutls_x509_crt_import() must not be called with a NULL certificate Bug: http://curl.haxx.se/mail/lib-2014-04/0145.html Reported-by: Damian Dixon
As this makes curl_global_init_mem() behave the same way as curl_global_init() already does in that aspect - the same number of curl_global_cleanup() calls is then required to again decrease the counter and then eventually do the cleanup. Bug: http://curl.haxx.se/bug/view.cgi?id=1362 Reported-by: Tristan
When --with-nghttp2 was used (without a given path), the PKG_CONFIG_LIBDIR varialbe could get clobbered and ruin a proper detection of the library. Reported-by: Dilyan Palauzov Bug: http://curl.haxx.se/mail/lib-2014-04/0159.html
copy and paste error
ufds might not be allocated in case nfds overflows to zero while extra_nfds is still non-zero. udfs is then accessed within the extra_nfds-based for loop.
Follow up on b0e7425
In case the first address in the tempaddr array is NULL, the code would previously dereference an unchecked null pointer.
I was tempted to change those to >= 0 until I saw that this is actually a for loop that terminates once i underflows.
The FreeContextBuffer SAL declaration does not declare the pointer as optional, therefore it must not be NULL.