https://github.com/bcgsc/ntCard
Revision 54236875c729e463a1339326b4679fb55799df27 authored by Étienne Mollier on 16 June 2021, 16:48:15 UTC, committed by Étienne Mollier on 16 June 2021, 16:48:15 UTC
totalSize is compared against a value of 50 billion. On 32 bits cpu architectures, a size_t is an unsigned int effectively 32 bits wide, per definition of size_t. However the integer would have overflown already at 5 billion. On 64 bits cpu architecture, the size_t matches effectively the type of an unsigned long long, so aligning to that type avoids the overflow. The issue has been caught initially by Adrian Bunk, from the Debian QA group, on Debian bug #989855[1]. [1]: https://bugs.debian.org/989855
1 parent 5fb4327
Tip revision: 54236875c729e463a1339326b4679fb55799df27 authored by Étienne Mollier on 16 June 2021, 16:48:15 UTC
change totalSize type from size_t to ull
change totalSize type from size_t to ull
Tip revision: 5423687
File | Mode | Size |
---|---|---|
Common | ||
data | ||
vendor | ||
.clang-format | -rw-r--r-- | 211 bytes |
CITATION.bib | -rw-r--r-- | 490 bytes |
ChangeLog | -rw-r--r-- | 491 bytes |
LICENSE | -rw-r--r-- | 1.0 KB |
Makefile.am | -rw-r--r-- | 2.6 KB |
README.md | -rw-r--r-- | 4.7 KB |
autogen.sh | -rwxr-xr-x | 58 bytes |
azure-pipelines.yml | -rw-r--r-- | 2.1 KB |
configure.ac | -rw-r--r-- | 2.0 KB |
ntcard-logo.png | -rw-r--r-- | 45.0 KB |
ntcard.cpp | -rw-r--r-- | 12.8 KB |
nthll.cpp | -rw-r--r-- | 7.2 KB |
Computing file changes ...