在 2019/8/30 5:57, Christian Franke 写道:
> 
> New patch attached. New mempcpy() code now guarded by _GNU_SOURCE, old
> prototype unchanged.
> 
> Adds checks for functions without corresponding __builtin_*_chk(). This
> includes warnings if buffer overflow could be detected during compile time.
> 
> Functions added: memcpy_s(), wcscpy(), wcscat(), gets(), fgets(),
> fread(), tmpnam().
> !__USE_MINGW_ANSI_STDIO: sprintf(), vsprintf()
> 
> Missing but easy to add: read(), memset_s(), strcpy_s(), strcat_s(), ...
> 

Thanks. I pushed it.

Side note: Unlike GNU libc, our CRT does not provide `__chk_fail()`. So,
unless complemented by `-lssp`, either explicitly or implicitly by
`-fstack-protector`, use of `-D_FORTIFY_SOURCE` and `-O` with arguments
greater than zero will result in undefined references.


-- 
Best regards,
LH_Mouse

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to