1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-27 02:56:18 -04:00

This version of ELinks crashed on a normal chunked data.

This bug was introduced in commit b3845a7998.
This commit is contained in:
Witold Filipczyk 2007-10-04 19:28:26 +02:00 committed by Witold Filipczyk
parent 5504699914
commit 7dd9ef674a

View File

@ -1010,14 +1010,15 @@ decompress_data(struct connection *conn, unsigned char *data, int len,
off_t *length_of_block;
unsigned char *output = NULL;
length_of_block = (http->length == LEN_CHUNKED ? &http->chunk_remaining
: &http->length);
#define BIG_READ 65536
if (http->length == LEN_CHUNKED) {
if (http->chunk_remaining == CHUNK_ZERO_SIZE)
state = FINISHING;
else
length_of_block = &http->chunk_remaining;
} else {
length_of_block = &http->length;
if (!*length_of_block) {
/* Going to finish this decoding bussiness. */
state = FINISHING;