]> granicus.if.org Git - curl/commit
vtls: Don't set cert info count until memory allocation is successful
authorSteve Holme <steve_holme@hotmail.com>
Fri, 26 Dec 2014 11:58:17 +0000 (11:58 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Fri, 26 Dec 2014 13:11:43 +0000 (13:11 +0000)
commitcdc1cc22e75bbe6434e9603c91e933171ac9edf2
treefbad6cdbfa4fdc596c59b6770875b7411f555068
parentfe43a662a25ab3903176575f1a7e0f8a04a9adc5
vtls: Don't set cert info count until memory allocation is successful

Otherwise Curl_ssl_init_certinfo() can fail and set the num_of_certs
member variable to the requested count, which could then be used
incorrectly as libcurl closes down.
lib/vtls/vtls.c