summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@iki.fi>2008-04-11 12:33:37 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-04-17 16:26:10 +0300
commit731d6f5f032d42dfa7a840a27344a34169add098 (patch)
tree9805dedce8e909fed81a527e24af11e2412dbf46
parentc446765460a7680b45f4ca8aab9bdc7a7141beec (diff)
compr_lzo.c: allocate enough memory for lzo compressor.
This is the same bug as in kernel, pointed out the LZO author (Markus Oberhumer): http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f2a11b158a24301e9158e9c873fa88e5eb775486 Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-rw-r--r--compr_lzo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compr_lzo.c b/compr_lzo.c
index fb54600..a0bb362 100644
--- a/compr_lzo.c
+++ b/compr_lzo.c
@@ -97,7 +97,7 @@ int jffs2_lzo_init(void)
return -1;
/* Worse case LZO compression size from their FAQ */
- lzo_compress_buf = malloc(page_size + (page_size / 64) + 16 + 3);
+ lzo_compress_buf = malloc(page_size + (page_size / 16) + 64 + 3);
if (!lzo_compress_buf) {
free(lzo_mem);
return -1;