diff --git a/lib/url.c b/lib/url.c index 792ce777cf1273c95815eee7c6db84a1d6c075c0..1251373c3001e1bd8b0b1766c5d09d1645fd55f2 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2701,7 +2701,9 @@ static void conn_reset_postponed_data(struct connectdata *conn, int num) if(psnd->buffer) { DEBUGASSERT(psnd->allocated_size > 0); DEBUGASSERT(psnd->recv_size <= psnd->allocated_size); - DEBUGASSERT(psnd->recv_processed < psnd->recv_size); + DEBUGASSERT(psnd->recv_size ? + (psnd->recv_processed < psnd->recv_size) : + (psnd->recv_processed == 0)); DEBUGASSERT(psnd->bindsock != CURL_SOCKET_BAD); free(psnd->buffer); psnd->buffer = NULL;