[Bug middle-end/93636] Incorrect diagnostic of a potential string overflow in strncat

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 10 05:04:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93636

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |middle-end

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect most people don't understand the semantics of strncat enough.  This
is why the warning is there.  Most people don't understand that the length
passed to strncat is the length left (minus 1).


More information about the Gcc-bugs mailing list