Skip to content

Prevent integer overflow when allocating arrays

Tony Finch requested to merge fanf-overflow-checks into main

Ensure that the size calculation does not overflow when allocating memory for an array.

Add ISC_OVERFLOW macros for checked arithmetic operations. Use them to implement isc_mem_callocate(). Use isc_mem_callocate() where appropriate.

Closes: #4120 (closed) #4121 (closed) #4122 (closed)

Edited by Ondřej Surý

Merge request reports