newsgnulib - GNU portability library - News

 
 

Gnulib helps you avoid integer overflow vulnerabilities

Item posted by Paul Eggert <eggert> on Tue 08 Dec 2020 01:47:09 AM UTC.

Gnulib's intprops module has new macros INT_ADD_OK, INT_SUBTRACT_OK, and INT_MULTIPLY_OK that support portable overflow checking while doing integer arithmetic. On GNU platforms the macros typically use only a single machine instruction more than ordinary integer arithmetic would.

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code