Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected UnicodeDecodeError #24

Closed
Lukasa opened this issue Feb 1, 2016 · 0 comments
Closed

Unexpected UnicodeDecodeError #24

Lukasa opened this issue Feb 1, 2016 · 0 comments

Comments

@Lukasa
Copy link
Member

Lukasa commented Feb 1, 2016

Encountered the following traceback when fuzzing hyper-h2:

Traceback (most recent call last):
  File "script.py", line 10, in <module>
    c.receive_data(sys.stdin.read())
  File "/Users/cory/tmp/fuzz-results/env/lib/python2.7/site-packages/h2/connection.py", line 892, in receive_data
    events.extend(self._receive_frame(frame))
  File "/Users/cory/tmp/fuzz-results/env/lib/python2.7/site-packages/h2/connection.py", line 915, in _receive_frame
    frames, events = self._frame_dispatch_table[frame.__class__](frame)
  File "/Users/cory/tmp/fuzz-results/env/lib/python2.7/site-packages/h2/connection.py", line 956, in _receive_headers_frame
    headers = self.decoder.decode(frame.data)
  File "/Users/cory/tmp/fuzz-results/env/lib/python2.7/site-packages/hpack/hpack.py", line 351, in decode
    return [(n.decode('utf-8'), v.decode('utf-8')) for n, v in headers]
  File "/Users/cory/tmp/fuzz-results/env/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x87 in position 1: invalid start byte

It would be better if a HPACK-specific exception were thrown here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant