Skip to content

Commit 3e0fcb6

Browse files
committed
Don't apply E8 transform on 32769th frame (off-by-one error)
1 parent ff629a0 commit 3e0fcb6

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

libmspack/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2020-01-08 Stuart Caie <kyzer@cabextract.org.uk>
2+
3+
* lzxd_decompress(): do not apply the E8 transformation on the
4+
32769th LZX frame! Thanks to Cezary Sliwa for discovering this
5+
bug and providing an example cab file (which is
6+
http://download.windowsupdate.com/d/msdownload/update/driver/
7+
drvs/2019/11/016c7f3e-809d-4720-893b-
8+
e0d74f10c39d_35e12507628e8dc8ae5fb3332835f4253d2dab23.cab)
9+
110
2019-02-18 Stuart Caie <kyzer@cabextract.org.uk>
211

312
* chmd_read_headers(): a CHM file name beginning "::" but shorter

libmspack/mspack/lzxd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ int lzxd_decompress(struct lzxd_stream *lzx, off_t out_bytes) {
827827

828828
/* does this intel block _really_ need decoding? */
829829
if (lzx->intel_started && lzx->intel_filesize &&
830-
(lzx->frame <= 32768) && (frame_size > 10))
830+
(lzx->frame < 32768) && (frame_size > 10))
831831
{
832832
unsigned char *data = &lzx->e8_buf[0];
833833
unsigned char *dataend = &lzx->e8_buf[frame_size - 10];

0 commit comments

Comments
 (0)