Skip to content

Commit

Permalink
fix: did not stop reading RIFF after incomplete chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTaquet committed Sep 12, 2016
1 parent f26b098 commit 46a0612
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RIFF/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,10 @@ def read(self, file, maxSize=None):
#warnings.warn("got a {} chunk of size={}, maxSize={}".format(chunk.header.id,chunk.header.size,maxSize))
except Chunk.HeaderSizeError:
warnings.warn("'RIFF' chunk does not finish after a chunk")
maxSize = 0;
except Chunk.DataSizeError:
warnings.warn("'RIFF' chunk contains an ignored truncaded chunk")
maxSize = 0;
if not self.valid():
raise ChunkList.InvalidError()

Expand Down

0 comments on commit 46a0612

Please sign in to comment.