]> git.ipfire.org Git - thirdparty/curl.git/commit
pingpong: return error when trying to send without connection
authorDaniel Stenberg <daniel@haxx.se>
Fri, 6 Oct 2017 15:20:54 +0000 (17:20 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 6 Oct 2017 22:20:31 +0000 (00:20 +0200)
commit5b54df06d2cec422d5f237e0fa0212be0303edce
treed37eab3cb0209848942478c593902af21c689090
parent0af5ac27c3d818f0a962de1e1029c0af7d497080
pingpong: return error when trying to send without connection

When imap_done() got called before a connection is setup, it would try
to "finish up" and dereffed a NULL pointer.

Test case 1553 managed to reproduce. I had to actually use a host name
to try to resolve to slow it down, as using the normal local server IP
will make libcurl get a connection in the first curl_multi_perform()
loop and then the bug doesn't trigger.

Fixes #1953
Assisted-by: Max Dymond
lib/pingpong.c
tests/data/Makefile.inc
tests/data/test1553 [new file with mode: 0644]
tests/libtest/Makefile.inc
tests/libtest/lib1553.c [new file with mode: 0644]