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

A jpeg causes img2sixel to crash with an integer overflow #168

Open
DavidGriffith opened this issue May 31, 2022 · 1 comment
Open

A jpeg causes img2sixel to crash with an integer overflow #168

DavidGriffith opened this issue May 31, 2022 · 1 comment

Comments

@DavidGriffith
Copy link

$ sixel2png lolwut.jpg
runtime error: integer overflow
safe_addition_for_params: ingeger overflow detected.

And here's the image that provokes this error.

lolwut

No, I'm not kidding. I went through a few of my favorite images and img2sixel barfed on this one.

@j4james
Copy link

j4james commented Feb 15, 2025

I think this is just a user error. The initial instructions at the top of the issue suggest you were calling sixel2png rather than img2sixel. As far as I can tell img2sixel has no problem converting this image, and it's understandable that sixel2png would fail, because the source file isn't sixel!

The code is trying desperately to find something that looks like sixel in that jpeg file, but at some point it comes across a sequence of digits that it thinks is a numeric parameter, but the number is far too big, so it gives up and reports an error. This is just a regular error report rather than a crash, so I believe it's working as expected.

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

3 participants
@DavidGriffith @j4james and others