mirror of
https://github.com/bkerler/edl.git
synced 2024-11-14 19:14:58 -05:00
Fix sparse check exception
If a program file is less than 28 bytes,
the checking for sparse header will fire exception,
Since the unpack funciton expect the input data length
to be 28 bytes.
This was accidentally reverted by commit
4d5cb463d2
This commit is contained in:
parent
312cf3bb99
commit
4b81305948
1 changed files with 4 additions and 1 deletions
|
@ -43,7 +43,10 @@ class QCSparse(metaclass=LogBase):
|
|||
self.__logger.addHandler(fh)
|
||||
|
||||
def readheader(self):
|
||||
header = unpack("<I4H4I", self.rf.read(0x1C))
|
||||
buf = self.rf.read(0x1C)
|
||||
if len(buf) != 28:
|
||||
return False
|
||||
header = unpack("<I4H4I", buf)
|
||||
magic = header[0]
|
||||
self.major_version = header[1]
|
||||
self.minor_version = header[2]
|
||||
|
|
Loading…
Reference in a new issue