All of lore.kernel.org
 help / color / mirror / Atom feed
From: Riku Voipio <riku.voipio@iki.fi>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] compr_lzo.c: allocate enough memory for lzo compressor.
Date: Fri, 11 Apr 2008 12:33:37 +0300	[thread overview]
Message-ID: <20080411093337.GA22045@kos.to> (raw)

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
---
 compr_lzo.c |    2 +-
 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;
-- 
1.5.4.5


-- 
"rm -rf" only sounds scary if you don't have backups

             reply	other threads:[~2008-04-11  9:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11  9:33 Riku Voipio [this message]
2008-04-11 10:52 ` [PATCH] compr_lzo.c: allocate enough memory for lzo compressor Joakim Tjernlund
2008-04-11 11:07   ` Riku Voipio
2008-04-17 11:47 ` Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080411093337.GA22045@kos.to \
    --to=riku.voipio@iki.fi \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.