goto finished;
if (code == -2)
goto decode_error;
+ if (code >= 30) /* dist symbols 30 and 31 are invalid */
+ goto decode_error;
dctx->state = GOTDISTSYM;
dctx->sym = code;
break;
sfree(outbuf);
} else {
fprintf(stderr, "decoding error\n");
+ fclose(fp);
return 1;
}
}