summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/reallocarray.3
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2015-08-16 13:59:11 +0000
committered <ed@FreeBSD.org>2015-08-16 13:59:11 +0000
commitaa32555cb3d67406e22636b93f8bd2cbaf60b396 (patch)
treef81cadbe5706c2896aeeb486b403b6d7ab344c39 /lib/libc/stdlib/reallocarray.3
parent718cf25701716f09aa96832c64151fb8aa286279 (diff)
downloadFreeBSD-src-aa32555cb3d67406e22636b93f8bd2cbaf60b396.zip
FreeBSD-src-aa32555cb3d67406e22636b93f8bd2cbaf60b396.tar.gz
Pick UINT_MAX / 100 as an upperbound.
The fix that I applied in r286798 is already good, but it assumes that sizeof(int) > sizeof(short). Express the upperbound in terms of UINT_MAX. By dividing that by 100, we're sure that the resulting value is never larger than approximately UINT_MAX / 10, which is safe. PR: 202326 Discussed with: kcwu csie org MFC after: 1 month
Diffstat (limited to 'lib/libc/stdlib/reallocarray.3')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud