-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove potential dangerous pointer access
- Loading branch information
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
223d18a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I'm the author of hexedit (available here: https://github.com/pixel/hexedit).
I was reviewing your commits for inclusion. But i really don't understand your commit: in function get_number, "i" parameter is OUT, not IN.
I would have do the following:
223d18a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, fixed in e0870a0
223d18a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i hope you see the issue that the old code would overwrite random memory if off_t happens to be 32bit?
scanf assumes it gets a pointer to a long long.
(found via gcc warnings)