From 8171fa4eb7542280f2982dc6d00e832933c6da99 Mon Sep 17 00:00:00 2001 From: Guy Martin Date: Wed, 22 Jan 2014 14:59:42 +0100 Subject: Add patch to fix busybox bunzip2, see #497916. Signed-off-by: Guy Martin --- patches/busybox/1.20.2/busybox-1.20.2-bunzip2.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 patches/busybox/1.20.2/busybox-1.20.2-bunzip2.patch (limited to 'patches') diff --git a/patches/busybox/1.20.2/busybox-1.20.2-bunzip2.patch b/patches/busybox/1.20.2/busybox-1.20.2-bunzip2.patch new file mode 100644 index 0000000..f46a4a5 --- /dev/null +++ b/patches/busybox/1.20.2/busybox-1.20.2-bunzip2.patch @@ -0,0 +1,12 @@ +diff -uNr busybox-1.20.2.orig/archival/libarchive/decompress_bunzip2.c busybox-1.20.2/archival/libarchive/decompress_bunzip2.c +--- busybox-1.20.2.orig/archival/libarchive/decompress_bunzip2.c 2014-01-20 11:16:01.817359481 +0100 ++++ busybox-1.20.2/archival/libarchive/decompress_bunzip2.c 2014-01-20 11:16:47.492875819 +0100 +@@ -440,7 +440,7 @@ + literal used is the one at the head of the mtfSymbol array.) */ + if (runPos != 0) { + uint8_t tmp_byte; +- if (dbufCount + runCnt >= dbufSize) return RETVAL_DATA_ERROR; ++ if (dbufCount + runCnt > dbufSize) return RETVAL_DATA_ERROR; + tmp_byte = symToByte[mtfSymbol[0]]; + byteCount[tmp_byte] += runCnt; + while (--runCnt >= 0) dbuf[dbufCount++] = (uint32_t)tmp_byte; -- cgit v1.2.3-65-gdbad