mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fixed dealing with faulty COMM chunks.
This commit is contained in:
parent
4fddf33c87
commit
4150ede53c
1 changed files with 3 additions and 3 deletions
|
@ -391,9 +391,6 @@ class Aifc_read:
|
||||||
formlength = 0
|
formlength = 0
|
||||||
break
|
break
|
||||||
raise EOFError # different error, raise exception
|
raise EOFError # different error, raise exception
|
||||||
formlength = formlength - 8 - chunk.chunksize
|
|
||||||
if chunk.chunksize & 1:
|
|
||||||
formlength = formlength - 1
|
|
||||||
if chunk.chunkname == 'COMM':
|
if chunk.chunkname == 'COMM':
|
||||||
self._read_comm_chunk(chunk)
|
self._read_comm_chunk(chunk)
|
||||||
self._comm_chunk_read = 1
|
self._comm_chunk_read = 1
|
||||||
|
@ -409,6 +406,9 @@ class Aifc_read:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
raise Error, 'unrecognized chunk type '+chunk.chunkname
|
raise Error, 'unrecognized chunk type '+chunk.chunkname
|
||||||
|
formlength = formlength - 8 - chunk.chunksize
|
||||||
|
if chunk.chunksize & 1:
|
||||||
|
formlength = formlength - 1
|
||||||
if formlength > 0:
|
if formlength > 0:
|
||||||
chunk.skip()
|
chunk.skip()
|
||||||
if not self._comm_chunk_read or not self._ssnd_chunk:
|
if not self._comm_chunk_read or not self._ssnd_chunk:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue