Matthijs Kooijman <[EMAIL PROTECTED]> added the comment:

I've written a new patch, which works a bit better. You can find the new
patch attached.

I've restructed the patch to prevent code duplication. Also, it now
works with other chunks than bext (I had a file with a list chunk which
triggered my interest in this bug). This is done with a hardcoded list
of valid chunks. However, it seems that there is no complete list of
valid chunk types, so it might be better to remove the chunk type check
alltogether.

Also, this patch explicitly checks for overflow, since taking a slice of
a sequence does not seem to trigger an IndexError, but just return an
empty sequence.

----------
keywords: +patch
nosy: +matthijs
Added file: http://bugs.python.org/file11501/sndhdr.diff

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1611944>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to