diff -u orig/lib/easy.c patched/lib/easy.c
--- orig/lib/easy.c	2009-10-28 20:21:58.000000000 +0000
+++ patched/lib/easy.c	2010-02-25 11:09:28.207471000 +0000
@@ -808,6 +808,8 @@
        further use of it, and make sure we don't clear it after the function
        invoke as it may have been set to a new value by then */
     data->state.tempwrite = NULL;
+    data->state.tempwritesize = 0;
+    data->state.tempwritetype = 0;
 
     /* since the write callback API is define to never exceed
        CURL_MAX_WRITE_SIZE bytes in a single call, and since we may in fact
diff -u orig/lib/sendf.c patched/lib/sendf.c
--- orig/lib/sendf.c	2009-06-10 22:26:11.000000000 +0100
+++ patched/lib/sendf.c	2010-02-25 11:09:55.910953000 +0000
@@ -376,11 +376,27 @@
   if(data->req.keepon & KEEP_RECV_PAUSE) {
     size_t newlen;
     char *newptr;
+
+    /* If the transfer was paused using curl_easy_pause(), maybe we didn't
+       have any data yet in the buffer - lets initialize it. */
+    if( data->state.tempwritetype == 0 )
+    {
+    	data->state.tempwritetype = type;
+    	DEBUGASSERT( data->state.tempwrite == NULL );
+    	DEBUGASSERT( data->state.tempwritesize == 0 );
+    	data->state.tempwrite = NULL; /* realloc will get a new buffer */
+    	data->state.tempwritesize = type;
+    }
+    else
+    {
+        DEBUGASSERT(data->state.tempwrite);
+    }
+
     if(type != data->state.tempwritetype)
+    {
       /* major internal confusion */
       return CURLE_RECV_ERROR;
-
-    DEBUGASSERT(data->state.tempwrite);
+    }
 
     /* figure out the new size of the data to save */
     newlen = len + data->state.tempwritesize;
