]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib: Add MALLOC_MULTIPLY() and MALLOC_ADD()
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 12 Dec 2016 02:53:02 +0000 (04:53 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 16 Dec 2016 21:41:21 +0000 (23:41 +0200)
commitb716136fc47efd434d60be5db262b4013e375fa9
tree2802c184cfc58c51cca41976a03c051565e4b69c
parent618262376e4a087f2047e627baf008884a4085b9
lib: Add MALLOC_MULTIPLY() and MALLOC_ADD()

These can be used for calculating memory allocation sizes. If there's an
overflow, the macro panics.
src/lib/Makefile.am
src/lib/lib.h
src/lib/malloc-overflow.h [new file with mode: 0644]
src/lib/test-lib.inc
src/lib/test-malloc-overflow.c [new file with mode: 0644]