cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Oops - Serious bug in 7.10 - more info

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 9 Oct 2002 14:49:18 +0200 (MET DST)

On Wed, 9 Oct 2002, Daniel Stenberg wrote:

> Apply this, test, go to bed. :-)

Hm, perhaps I should test a bit more before I post patches. The previous one
was a little bit premature, but I do believe this one works pretty good:

diff -u -r1.114 transfer.c
--- transfer.c 7 Oct 2002 13:38:34 -0000 1.114
+++ transfer.c 9 Oct 2002 12:48:07 -0000
@@ -302,6 +302,9 @@
             break; /* read more and try again */
           }

+ /* decrease the size of the remaining buffer */
+ nread -= (k->end_ptr - k->str)+1;
+
           k->str = k->end_ptr + 1; /* move past new line */

           /*
@@ -695,13 +698,6 @@
         /* We might have reached the end of the header part here, but
            there might be a non-header part left in the end of the read
            buffer. */
-
- if (!k->header) {
- /* starting here, this is not part of the header! */
-
- /* we subtract the remaining header size from the buffer */
- nread -= (k->str - k->buf);
- }

       } /* end if header mode */

Alas, we have a 7.10.1 coming up really soon now. This is a bad bug.

-- 
 Daniel Stenberg -- curl related mails on curl related mailing lists please
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-09