--- libsmacker-1.2.0.orig/smacker.c +++ libsmacker-1.2.0/smacker.c @@ -405,14 +405,6 @@ static int smk_huff16_build(struct smk_h t->tree = NULL; return 0; } - - /* check that we completely filled the tree */ - if (limit != t->size) { - fputs("libsmacker::smk_huff16_build() - ERROR: failed to completely decode huff16 tree\n", stderr); - free(t->tree); - t->tree = NULL; - return 0; - } } else { if ((t->tree = malloc(sizeof(unsigned int))) == NULL) { perror("libsmacker::smk_huff16_build() - ERROR: failed to malloc() huff16 tree"); @@ -420,7 +412,8 @@ static int smk_huff16_build(struct smk_h } t->tree[0] = 0; - //t->cache[0] = t->cache[1] = t->cache[2] = 0; + t->cache[0] = t->cache[1] = t->cache[2] = 0; + return 1; } /* Check final end tag. */