blob: a9840fe01f0225e5e67c6798f43d66d367f0f532 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--- ./squashfs-tools/unsquashfs.c.orig
+++ ./squashfs-tools/unsquashfs.c
@@ -2099,7 +2099,9 @@
*/
void *inflator(void *arg)
{
- char tmp[block_size];
+ char *tmp = malloc(block_size);
+ if(tmp == NULL)
+ EXIT_UNSQUASH("Out of memory allocating block buffer\n");
while(1) {
struct cache_entry *entry = queue_get(to_inflate);
@@ -2122,6 +2124,7 @@
*/
cache_block_ready(entry, res == -1);
}
+ free(tmp);
}
|