jvoisin/fortify-headers

Make use of __chk variants

Closed this issue · 2 comments

eg.

#define snprintf(str, len, ...) \
    __builtin___snprintf_chk(str, len, 0, builtin_object_size(str), __VA_ARGS__)

GCC 12 has those for memcpy, mempcpy, memmove, memset, strcpy, stpcpy, strncpy, strcat and strncat.

Partially done in 2ccfced

And completely done in 81ef1fd and 1603cf6