]> wimlib.net Git - wimlib/commit
lzms-common.c: Don't process first byte in x86 filter
authorEric Biggers <ebiggers3@gmail.com>
Sat, 26 Jul 2014 05:58:40 +0000 (00:58 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 26 Jul 2014 06:19:20 +0000 (01:19 -0500)
commit4ad95e3ae44b06199652ffc855df523a6990e4a7
tree74bd148343883bb047855078d3add66985515eb6
parentb9336b454923a3a6324e920f38363e46687f1a0f
lzms-common.c:  Don't process first byte in x86 filter

Microsoft's LZMS compressor and decompressor seemingly skip this byte.

This resulted in different behavior on the following uncompressed data:

0000000 e8 6b e8 fb ff 5e 1f 03 e8 63 e8 fb ff 5e c0 02
0000016 e8 5b e8 fb ff 5e 51 01 e8 53 e8 fb ff 5e c4 00

wimlib would do a translation following the e8 byte at offset 16, since
it would enable x86 translations following the identification of matching
absolute addresses following the potential opcodes at offsets 0 and 8.
But as far as I can tell, the Microsoft implementation just skips byte 0
entirely and doesn't consider it as beginning a potential instruction.
src/lzms-common.c