summaryrefslogtreecommitdiffstats
path: root/src/include/byteswap.h
diff options
context:
space:
mode:
authorMichael Brown2015-02-26 14:01:55 +0100
committerMichael Brown2015-02-26 14:01:55 +0100
commitea3be0f4a65f2d7e8b16b9cdef89fe93f28d7008 (patch)
tree4996dd41402a994f9c55b7ff50787cdd86131aa2 /src/include/byteswap.h
parent[zbin] Allow decompressor to generate debug output via BIOS console (diff)
downloadipxe-ea3be0f4a65f2d7e8b16b9cdef89fe93f28d7008.tar.gz
ipxe-ea3be0f4a65f2d7e8b16b9cdef89fe93f28d7008.tar.xz
ipxe-ea3be0f4a65f2d7e8b16b9cdef89fe93f28d7008.zip
[zbin] Fix check for existence of most recent output byte
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>
Diffstat (limited to 'src/include/byteswap.h')
0 files changed, 0 insertions, 0 deletions