public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] inflate_fast: sout is already a short so ptr arith was off by one.
@ 2010-02-28 16:06 Joakim Tjernlund
  2010-02-28 16:06 ` [PATCH 2/2] crc32: Some minor cleanups Joakim Tjernlund
  2010-03-02 22:52 ` [PATCH 1/2] inflate_fast: sout is already a short so ptr arith was off by one Andrew Morton
  0 siblings, 2 replies; 5+ messages in thread
From: Joakim Tjernlund @ 2010-02-28 16:06 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel; +Cc: Joakim Tjernlund

This won't change anything for current code, but post increment
will break without this fix, should anyone want to try that.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 lib/zlib_inflate/inffast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/zlib_inflate/inffast.c b/lib/zlib_inflate/inffast.c
index fa62fc7..2c13ecc 100644
--- a/lib/zlib_inflate/inffast.c
+++ b/lib/zlib_inflate/inffast.c
@@ -286,7 +286,7 @@ void inflate_fast(z_streamp strm, unsigned start)
 		    } else { /* dist == 1 or dist == 2 */
 			unsigned short pat16;
 
-			pat16 = *(sout-2+2*OFF);
+			pat16 = *(sout-1+OFF);
 			if (dist == 1) {
 				union uu mm;
 				/* copy one char pattern to both bytes */
-- 
1.6.4.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-03 11:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-28 16:06 [PATCH 1/2] inflate_fast: sout is already a short so ptr arith was off by one Joakim Tjernlund
2010-02-28 16:06 ` [PATCH 2/2] crc32: Some minor cleanups Joakim Tjernlund
2010-03-02 22:52 ` [PATCH 1/2] inflate_fast: sout is already a short so ptr arith was off by one Andrew Morton
2010-03-03  7:35   ` Joakim Tjernlund
     [not found]     ` <20100302234217.9eaa7c5e.akpm@linux-foundation.org>
2010-03-03 11:35       ` Joakim Tjernlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox