|
@@ -230,8 +230,10 @@ static int lzo_compress_pages(struct list_head *ws,
|
|
in_len = min(bytes_left, PAGE_SIZE);
|
|
in_len = min(bytes_left, PAGE_SIZE);
|
|
}
|
|
}
|
|
|
|
|
|
- if (tot_out > tot_in)
|
|
|
|
|
|
+ if (tot_out >= tot_in) {
|
|
|
|
+ ret = -E2BIG;
|
|
goto out;
|
|
goto out;
|
|
|
|
+ }
|
|
|
|
|
|
/* store the size of all chunks of compressed data */
|
|
/* store the size of all chunks of compressed data */
|
|
cpage_out = kmap(pages[0]);
|
|
cpage_out = kmap(pages[0]);
|