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

chardet stuck in infinty loop #183

Open
JakobDev opened this issue Nov 14, 2019 · 1 comment
Open

chardet stuck in infinty loop #183

JakobDev opened this issue Nov 14, 2019 · 1 comment

Comments

@JakobDev
Copy link

If you try to detect the encoding in some files, it will stuck in infinity loop. e.g.:

import chardet
f = open("/initrd.img","rb")
b = f.read()
f.close()
chardet.detect(b)
@malthe
Copy link

malthe commented Jun 25, 2021

How many bytes do you need to provide to chardet.detect of that file before it goes into the infinite loop? Perhaps it could be added to the test case.

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