[Bug c/81117] Improve buffer overflow checking in strncpy

bernd.edlinger at hotmail dot de gcc-bugzilla@gcc.gnu.org
Sun Dec 3 08:47:00 GMT 2017


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

--- Comment #22 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Martin Sebor from comment #21)
> I believe the bug you are pointing out was reported in
> https://sourceware.org/bugzilla/show_bug.cgi?id=22442 and fixed in Glibc
> 2.27.  Please see the discussion at
> https://sourceware.org/ml/libc-alpha/2017-11/msg00336.html for the
> background.

Ok, I see, thanks.

Maybe an info in this warning message pointing out the
other possibility (using __attribute__ ((__nonstring__)))
to resolve the other use case would be helpful ?


More information about the Gcc-bugs mailing list