From 5b54df06d2cec422d5f237e0fa0212be0303edce Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 6 Oct 2017 17:20:54 +0200 Subject: 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 --- tests/data/test1553 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/data/test1553 (limited to 'tests/data/test1553') diff --git a/tests/data/test1553 b/tests/data/test1553 new file mode 100644 index 000000000..c2fb9cc32 --- /dev/null +++ b/tests/data/test1553 @@ -0,0 +1,52 @@ + + + +IMAP +Clear Text +FETCH + + + +# +# Server-side + + +From: me@somewhere +To: fake@nowhere + +body + +-- + yours sincerely + + + + + + + +# +# Client-side + + +imap + + +IMAP cleanup before a connection was created + +# tool is what to use instead of 'curl' + +lib1553 + + +imap://non-existing-host.haxx.se:%IMAPPORT/1553 + + + +# +# Verify data after the test has been "shot" + + + + + -- cgit v1.2.3