Fixes some crashes with -D_FORTIFY_SOURCE=2