Decompressors: check for write errors in decompress_unlzo.c
Changes
1 files changed · +2 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| lib/decompress_unlzo.c | modified | +2 | −2 | View file |
lib/decompress_unlzo.c
View filediff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
index 6e56d54..855d9d3 100644
--- a/lib/decompress_unlzo.c
+++ b/lib/decompress_unlzo.c
@@ -187,8 +187,8 @@ STATIC inline int INIT unlzo(u8 *input, int in_len,
}
}
- if (flush)
- flush(out_buf, dst_len);
+ if (flush && flush(out_buf, dst_len) != dst_len)
+ goto exit_2;
if (output)
out_buf += dst_len;
if (posp)