aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-04-11 13:17:55 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-04-11 13:17:55 +0200
commitf01df1979812a1870b54ec676688137f61ab36c0 (patch)
tree6ff3ae7b9febc9a1fe768172ce5f934e926a7ebd /lib/connect.c
parentb2e06ea166a6c57befd9113ebcd0b4662f41a56f (diff)
checkconnection: don't call with NULL pointer
When checking if an existing RTSP connection is alive or not, the checkconnection function might be called with a SessionHandle pointer being NULL and then referenced causing a crash. This happened only using the multi interface. Reported by: Tinus van den Berg Bug: http://curl.haxx.se/bug/view.cgi?id=3280739
Diffstat (limited to 'lib/connect.c')
-rw-r--r--lib/connect.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 261b2150e..3cde1805e 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -1122,6 +1122,9 @@ curl_socket_t Curl_getconnectinfo(struct SessionHandle *data,
struct connectdata **connp)
{
curl_socket_t sockfd;
+
+ DEBUGASSERT(data);
+
if((data->state.lastconnect != -1) &&
(data->state.connc->connects[data->state.lastconnect] != NULL)) {
struct connectdata *c =