diff options
author | Sjoerd Mullender <sjoerd@acm.org> | 1993-08-26 14:12:07 (GMT) |
---|---|---|
committer | Sjoerd Mullender <sjoerd@acm.org> | 1993-08-26 14:12:07 (GMT) |
commit | 4150ede53c42edb3e77373414f9c6ee070bfa366 (patch) | |
tree | 2bd7d628789a21c4fcc1bff8e083a5ebc1da9f35 | |
parent | 4fddf33c87e8a377e98b8d05eb5a9808986081c2 (diff) | |
download | cpython-4150ede53c42edb3e77373414f9c6ee070bfa366.zip cpython-4150ede53c42edb3e77373414f9c6ee070bfa366.tar.gz cpython-4150ede53c42edb3e77373414f9c6ee070bfa366.tar.bz2 |
Fixed dealing with faulty COMM chunks.
-rw-r--r-- | Lib/aifc.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py index 7bdb9f0..2d897be 100644 --- a/Lib/aifc.py +++ b/Lib/aifc.py @@ -391,9 +391,6 @@ class Aifc_read: formlength = 0 break raise EOFError # different error, raise exception - formlength = formlength - 8 - chunk.chunksize - if chunk.chunksize & 1: - formlength = formlength - 1 if chunk.chunkname == 'COMM': self._read_comm_chunk(chunk) self._comm_chunk_read = 1 @@ -409,6 +406,9 @@ class Aifc_read: pass else: raise Error, 'unrecognized chunk type '+chunk.chunkname + formlength = formlength - 8 - chunk.chunksize + if chunk.chunksize & 1: + formlength = formlength - 1 if formlength > 0: chunk.skip() if not self._comm_chunk_read or not self._ssnd_chunk: |