summaryrefslogtreecommitdiff
path: root/malloc/tst-alloc_buffer.c
AgeCommit message (Collapse)Author
2018-01-01Update copyright dates with scripts/update-copyrights.Joseph Myers
* All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
2017-06-26Prevent an implicit int promotion in malloc/tst-alloc_buffer.cTulio Magno Quites Machado Filho
According to ISO C11, section 6.5.3.3 "Unary arithmetic operators", the result of the ~ operator is the bitwise complement of its (promoted) operand. This can lead to a comparison of a char with another integer type. Tested on powerpc, powerpc64 and powerpc64le. * malloc/tst-alloc_buffer.c (test_misaligned): Cast to char before comparing with another char.
2017-06-21Implement allocation buffers for internal useFlorian Weimer
This commit adds fixed-size allocation buffers. The primary use case is in NSS modules, where dynamically sized data is stored in a fixed-size buffer provided by the caller. Other uses include a replacement of mempcpy cascades (which is safer due to the size checking inherent to allocation buffers).