|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker mailing list Archives
[ curl-Bugs-2958508 ] trailer off-by-one problem in chunk parser
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 25 Feb 2010 03:49:02 +0000
Bugs item #2958508, was opened at 2010-02-24 21:49
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
I'm getting a crash in curl_easy_destroy on a curl handle that was used to read a chunked transfer in HTTP. The problem turned out to be a fencepost error in http_chunks.c. Here's the relevant section of code in 7.20.0:
case CHUNK_TRAILER:
if(*datap == 0x0d)
case CHUNK_TRAILER_CR:
case CHUNK_TRAILER_POSTCR:
/*
ch->dataleft = length;
Note that if the length of the trailer is 127 bytes, we'll write one off the end of the ptr returned in the malloc statement since the CHUNK_TRAILER_POSTCR writes two bytes into that buffer even when trlPos is 127.
----------------------------------------------------------------------
You can respond by visiting:
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info