diff --git a/lib/decompress_unlzma.c b/lib/decompress_unlzma.c index 48173594ce01400d2fca2d61423e94f4edf5fb6e..696c34a274cf2df7eec8b7a175a9c886e11b882b 100644 --- a/lib/decompress_unlzma.c +++ b/lib/decompress_unlzma.c @@ -574,8 +574,10 @@ STATIC inline int INIT unlzma(unsigned char *buf, int in_len, ((unsigned char *)&header)[i] = *rc.ptr++; } - if (header.pos >= (9 * 5 * 5)) + if (header.pos >= (9 * 5 * 5)) { error("bad header"); + goto exit_1; + } mi = 0; lc = header.pos;