-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #208 check for overflow when resizing array
- Loading branch information
1 parent
1e8597d
commit a3b933a
Showing
1 changed file
with
24 additions
and
5 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
This might not do what you want. It first calculates
t->size + 10
as an unsigned int and then converts to an uint64_t. However, there might be an overflow before the conversion. This should likely be something like:This forces the calculation to be done with 64 bit integers instead of the 32 bit done previously.