wok-current rev 17991
fusecloop: fix realloc index size
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Apr 23 15:42:00 2015 +0200 (2015-04-23) |
parents | 9375c1de578d |
children | c9e270dd464f |
files | fusecloop/stuff/fusecloop.u |
line diff
1.1 --- a/fusecloop/stuff/fusecloop.u Thu Apr 23 15:15:23 2015 +0200 1.2 +++ b/fusecloop/stuff/fusecloop.u Thu Apr 23 15:42:00 2015 +0200 1.3 @@ -476,7 +476,7 @@ 1.4 + tail.num_blocks = ntohl(n); 1.5 + n *= sizeof(*index); 1.6 + len = n + n/1000 + 12; 1.7 -+ compressed = (unsigned char *) realloc(compressed, n); 1.8 ++ compressed = (unsigned char *) realloc(compressed, len); 1.9 + if (!compressed || compress2(compressed, &len, (unsigned char *) index, 1.10 + n, Z_BEST_COMPRESSION) != Z_OK) 1.11 + quit("Index compression failed");