The code in lzma_literal() checks to see if we are at the start of the compressed input data in order to determine whether or not a most recent output byte exists. This check is incorrect, since initialisation of the decompressor will always consume the first five bytes of the compressed input data. Fix by instead checking whether or not we are at the start of the output data stream. This is, in any case, a more logical check. This issue was masked during development and testing since virtual machines tend to zero the initial contents of RAM; the spuriously-read "most recent output byte" is therefore likely to already be a zero when running in a virtual machine. Reported-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
194 |
|
194 |
|
195 |
|
195 |
|
196 |
|
196 |
|
197 |
|
|
|
198 |
|
197 |
|
199 |
|
198 |
|
200 |
|
199 |
|
|
|
||
487 |
|
486 |
|
488 |
|
487 |
|
489 |
|
488 |
|
490 |
|
|
|
|
489 |
|
|
491 |
|
490 |
|
492 |
|
491 |
|
493 |
|
492 |
|
|
|
||
901 |
|
900 |
|
902 |
|
901 |
|
903 |
|
902 |
|
904 |
|
|
|
905 |
|
903 |
|
906 |
|
904 |
|
907 |
|
905 |
|