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

IndexError: tuple index out of range #67

Closed
DRMacIver opened this issue Aug 17, 2015 · 2 comments
Closed

IndexError: tuple index out of range #67

DRMacIver opened this issue Aug 17, 2015 · 2 comments

Comments

@DRMacIver
Copy link
Contributor

The following string raises the titular exception when run chardet.detect is run on it using 9e419e9

b'\xfe\xcf'

Here's the full stack trace:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/david/crap/chardet/chardet/__init__.py", line 30, in detect
    u.feed(byte_str)
  File "/home/david/crap/chardet/chardet/universaldetector.py", line 189, in feed
    if prober.feed(byte_str) == ProbingState.found_it:
  File "/home/david/crap/chardet/chardet/charsetgroupprober.py", line 63, in feed
    state = prober.feed(byte_str)
  File "/home/david/crap/chardet/chardet/mbcharsetprober.py", line 75, in feed
    char_len)
  File "/home/david/crap/chardet/chardet/chardistribution.py", line 82, in feed
    if 512 > self._char_to_freq_order[order]:
IndexError: tuple index out of range

This one doesn't actually come from Hypothesis but from a fuzzing experiment I was running which it occurred to me would be applicable to chardet.

@dan-blanchard
Copy link
Member

dan-blanchard commented Apr 11, 2017

Fixed by 7e0c343. Will push out a 3.0.1 release with this fix very soon.

@dan-blanchard
Copy link
Member

Done.

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

No branches or pull requests

2 participants