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

divide by zero and "value inf is outside the range of representable values of type 'int'" #19

Closed
asarubbo opened this issue May 10, 2017 · 1 comment

Comments

@asarubbo
Copy link

On 1.3.1 with -fsanitize=undefined:

# imagew $FILE /tmp/out -outfmt bmp
$FILE -> /tmp/out
src/imagew-cmd.c:850:46: runtime error: division by zero
SUMMARY: AddressSanitizer: undefined-behavior src/imagew-cmd.c:850:46 in 
src/imagew-cmd.c:850:29: runtime error: value inf is outside the range of representable values of type 'int'
SUMMARY: AddressSanitizer: undefined-behavior src/imagew-cmd.c:850:29 in 
Resizing: 16387x57 -> 16387x1

Reproducer:
https://github.com/asarubbo/poc/blob/master/00278-imageworsener-fpe-outside-int

jsummers added a commit that referenced this issue May 15, 2017
Fixes a bug that could result in division by zero, at least for a JPEG
source image.
Fixes issues #19, #20
@jsummers
Copy link
Owner

Should be fixed by commit dc49c80.

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