Diaoul / enzyme

Python video metadata parser
MIT License
59 stars 24 forks source link

KeyError: 'SeekID' #17

Open fgeek opened 9 years ago

fgeek commented 9 years ago

Fuzzed sample: http://bugs.fi/media/afl/enzyme/enzyme-010.mkv Fuzzers used: http://lcamtuf.coredump.cx/afl/ https://bitbucket.org/jwilk/python-afl SHA1: bdead89b6b29ecf42269bad88ed3ae8626ac3372

mkvinfo.py:

import sys
import enzyme
inputfile = sys.argv[1]
try:
    with open(inputfile, 'rb') as f:
        mkv = enzyme.MKV(f)
    print(mkv.info)
    print(mkv.video_tracks)
    print(mkv.audio_tracks)
except enzyme.exceptions.MalformedMKVError:
    pass
Traceback (most recent call last):
  File "mkvinfo.py", line 8, in <module>
    mkv = enzyme.MKV(f)
  File "/usr/local/lib/python2.7/dist-packages/enzyme-0.4.1-py2.7.egg/enzyme/mkv.py", line 54, in __init__
    self._parse_seekhead(seek_head, segment, stream, specs)
  File "/usr/local/lib/python2.7/dist-packages/enzyme-0.4.1-py2.7.egg/enzyme/mkv.py", line 60, in _parse_seekhead
    element_id = ebml.read_element_id(seek['SeekID'].data)
  File "/usr/local/lib/python2.7/dist-packages/enzyme-0.4.1-py2.7.egg/enzyme/parsers/ebml/core.py", line 129, in __getitem__
    raise KeyError(key)
KeyError: 'SeekID'