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

Type casting inconsistency #174

Closed
ManSoSec opened this issue Dec 11, 2019 · 1 comment
Closed

Type casting inconsistency #174

ManSoSec opened this issue Dec 11, 2019 · 1 comment
Assignees
Milestone

Comments

@ManSoSec
Copy link

while ((int)(hdl_dat.byte - startpos) < section_size)

while (hdl_dat.byte - startpos < section_size)

Is a type casting (int) missed?

@rurban rurban self-assigned this Dec 25, 2019
@rurban
Copy link
Contributor

rurban commented Dec 26, 2019

We should rather zero-extend to long both sides here, to avoid overflows. Thanks. Done in 631bbac

rurban added a commit that referenced this issue Dec 26, 2019
Avoid overflows by casting to the larger type, zero-extended
@rurban rurban closed this as completed Dec 26, 2019
@rurban rurban added this to the 0.10 milestone Jan 6, 2020
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