Skip to content

[9.18] Prevent integer overflow when allocating arrays

Ondřej Surý requested to merge fanf-overflow-checks-9.18 into bind-9.18

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)

Partial backport of !8007 (merged)

Edited by Ondřej Surý

Merge request reports