about summary refs log tree commit diff
path: root/malloc/tst-alloc_buffer.c
Commit message (Collapse)AuthorAgeFilesLines
* Prevent an implicit int promotion in malloc/tst-alloc_buffer.cTulio Magno Quites Machado Filho2017-06-261-1/+1
| | | | | | | | | | | | 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.
* Implement allocation buffers for internal useFlorian Weimer2017-06-211-0/+665
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).