diff --git a/lzw.c b/lzw.c index 9d0159a85b19e48c430bcf652449eabd50e2be32..364e18a97fec77cb665323fead35475c9ecf7450 100644 --- a/lzw.c +++ b/lzw.c @@ -326,7 +326,7 @@ act_LZW_body(const HParseResult *p, void *u) /* sum total bytes in array, alloc buffer */ for(int i = 0; i < num_fragments; i++) { - total_buffer_size += H_FIELD_BYTES(i).len; // XXX can seq->elements[i] be NULL due to h_ignore? + total_buffer_size += H_FIELD_BYTES(i).len; } buffer = h_arena_malloc(p->arena, sizeof(uint8_t) * total_buffer_size); // XXX arena alloc, calloc @@ -395,7 +395,7 @@ void init_LZW_parser() { uint8_t *token = malloc(sizeof(uint8_t)); *token = i; - HBytes *lit = malloc(sizeof(HBytes)); // XXX: instead of HBytes*, use HBytes + HBytes *lit = malloc(sizeof(HBytes)); lit->token = token; lit->len = 1; context->lzw_code_table[i] = lit;