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

gdImageBmpCtx() may segfault for non-seekable contexts #275

Closed
cmb69 opened this issue Jul 24, 2016 · 0 comments
Closed

gdImageBmpCtx() may segfault for non-seekable contexts #275

cmb69 opened this issue Jul 24, 2016 · 0 comments
Assignees
Labels

Comments

@cmb69
Copy link
Contributor

cmb69 commented Jul 24, 2016

The compression parameter of gdImageBmpCtx() is declared as int, but actually is treated as boolean. If anything else than 0 or 1 is passed, however, gdImageBmpCtx() segfaults for non-seekable streams, because the condition to check for compression wrt. to non-seekable streams is not resilient enough.

@cmb69 cmb69 added the bug label Jul 24, 2016
@cmb69 cmb69 self-assigned this Jul 24, 2016
cmb69 added a commit that referenced this issue Jul 24, 2016
We must not check for `compression == 1`, but more generally for
`compression`. Furthermore we improve the related documentation.
@cmb69 cmb69 closed this as completed Jul 24, 2016
cmb69 added a commit that referenced this issue Jul 24, 2016
We must not check for `compression == 1`, but more generally for
`compression`. Furthermore we improve the related documentation.

(cherry picked from commit 497ba7f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant