summaryrefslogtreecommitdiff
path: root/libiconv/include/codepages.h
diff options
context:
space:
mode:
authorYann Sionneau <yann@sionneau.net>2020-12-20 19:15:14 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2020-12-23 13:39:37 +0100
commit015d5b8c1a75b551f7f0215543fac01d55abfc0f (patch)
tree3e05dba60292a9fd46c9eacdec99a7c7d8a2442f /libiconv/include/codepages.h
parent6993d9378224489b49325bd1fb962f0e8bb935f1 (diff)
stdlib: fix potential UB and integer overflow with huge allocations using malloc-simple allocator
Two things are fixed by this commit: 1/ It is wrong to allocate an object of size > PTRDIFF_MAX. It is explained in this thread: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63303 2/ There was a possible integer overflow in both malloc() and memalign() implementations of stdlib/malloc-simple. The malloc() integer overflow issue is fixed by the side effect of fixing the PTRDIFF_MAX issue. The memalign() one is fixed by adding a comparison. Signed-off-by: Yann Sionneau <yann@sionneau.net>
Diffstat (limited to 'libiconv/include/codepages.h')
0 files changed, 0 insertions, 0 deletions