[Bug c/93653] diagnose calls to strncmp with bound less than constant string length
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 10 17:40:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93653
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think we should warn about this if the second argument is a string literal,
not when optimizers propagate a pointer to a string literal to it, so do it in
the FEs, make sure it handles strncmp inline -D_FORTIFY_SOURCE=2 wrapper and
also handle strncasecmp as well.
More information about the Gcc-bugs
mailing list