mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
This version of ELinks crashed on a normal chunked data.
This bug was introduced in commit b3845a799803dc88cedbc99be603518486f76bf9.
This commit is contained in:
parent
5504699914
commit
7dd9ef674a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user