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

core dumped issue #89

Closed
niugx opened this issue Jun 17, 2019 · 1 comment
Closed

core dumped issue #89

niugx opened this issue Jun 17, 2019 · 1 comment

Comments

@niugx
Copy link

niugx commented Jun 17, 2019

There is issue in line 5051 of stbi__shiftsigned function of stb_image.h file, which cause a denial of service (assert fault) via a crafted bmp file.

5035 static int stbi__shiftsigned(int v, int shift, int bits)
5036 {
...
5049 STBI_ASSERT(v >= 0 && v < 256);
5050 v >>= (8-bits);
5051 STBI_ASSERT(bits >= 0 && bits <= 8);
5052 return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits];
5053 }

root@ubuntu:/libsixel-master/converters# ./img2sixel crafted.bmp
lt-img2sixel: stb_image.h:5051: stbi__shiftsigned: Assertion `bits >= 0 && bits <= 8' failed.
Aborted (core dumped)

Guoxiang Niu, Xiaolong Zhao, Muxing Guan, EaglEye Team

@saitoha
Copy link
Owner

saitoha commented Dec 18, 2019

Fixed on v1.8.4, Thanks!

@saitoha saitoha closed this as completed Dec 18, 2019
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