fancycode / pylzma

Python bindings for the LZMA library
http://www.joachim-bauch.de/projects/pylzma/
GNU Lesser General Public License v2.1
234 stars 72 forks source link

py7zlib: _read64Bit() returns None when reading bytes start with 0xff #66

Closed miurahr closed 2 years ago

miurahr commented 5 years ago

When running following test code, _read64Bit(file) returns None.

import io
import py7zlib

#  read  bytes start with b'\xff'
buf = io.BytesIO(b'\xff\xcd\xab\x90\x78\x56\x34\x12\xcf')
val = py7zlib.Base()._read64Bit(buf)
if val is None:
     raise

This is just a validation code for a border condition.

miurahr commented 2 years ago

There is no response.