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

2017-12-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

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

2017-12-03 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #22 from Bernd Edlinger --- (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

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

2017-12-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #21 from Martin Sebor --- 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

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

2017-12-02 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 Bernd Edlinger changed: What|Removed |Added CC||bernd.edlinger at hotmail dot de ---

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

2017-11-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

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

2017-11-17 Thread clyon at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 Christophe Lyon changed: What|Removed |Added CC||clyon at gcc dot gnu.org --- Comment

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

2017-11-13 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #17 from Daniel Fruzynski --- (In reply to Martin Sebor from comment #14) > (In reply to Dmitry G. Dyachenko from comment #12) > > I'm afraid the warning in the constant string case is unavoidable.

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

2017-11-13 Thread dimhen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #16 from Dmitry G. Dyachenko --- (In reply to Martin Sebor from comment #15) Thank you. Nice warnings!

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

2017-11-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #15 from Martin Sebor --- (In reply to Dmitry G. Dyachenko from comment #12) LTO doesn't interact with these warnings very well. pr71907 and pr79062 track a couple of the problems I know about. If you find a different issue please

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

2017-11-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #14 from Martin Sebor --- (In reply to Dmitry G. Dyachenko from comment #12) I'm afraid the warning in the constant string case is unavoidable. The call is folded at a point where the checker doesn't have access to the subsequent

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

2017-11-13 Thread dimhen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #13 from Dmitry G. Dyachenko --- Sounds like -Wno-stringop-overflow does not propagate into LTO build. I'll try make a small testcase

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

2017-11-13 Thread dimhen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #12 from Dmitry G. Dyachenko --- char *strncpy(char *dest, const char *src, size_t n); void foo(char* p) { strncpy(p, "1", 1); p[1] = 0; } with gcc8/r254663 is this expected? $ gcc -c -Wall x.c x.c: In function ‘foo’:

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

2017-11-11 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #11 from Martin Sebor --- Author: msebor Date: Sat Nov 11 18:04:21 2017 New Revision: 254659 URL: https://gcc.gnu.org/viewcvs?rev=254659=gcc=rev Log: gcc/ChangeLog: PR c/81117 * doc/extend.texi (attribute

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

2017-11-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #10 from Martin Sebor --- Author: msebor Date: Fri Nov 10 22:48:43 2017 New Revision: 254641 URL: https://gcc.gnu.org/viewcvs?rev=254641=gcc=rev Log: gcc/ChangeLog: PR c/81117 * config/darwin-c.c

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

2017-11-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED See Also|

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

2017-11-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #8 from Martin Sebor --- Author: msebor Date: Fri Nov 10 16:35:26 2017 New Revision: 254630 URL: https://gcc.gnu.org/viewcvs?rev=254630=gcc=rev Log: PR c/81117 - Improve buffer overflow checking in strncpy gcc/ChangeLog:

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

2017-09-13 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #7 from Aldy Hernandez --- Author: aldyh Date: Wed Sep 13 16:58:44 2017 New Revision: 252431 URL: https://gcc.gnu.org/viewcvs?rev=252431=gcc=rev Log: PR c/81117 - Improve buffer overflow checking in strncpy - part 2 gcc/ChangeLog:

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

2017-09-13 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #6 from Aldy Hernandez --- Author: aldyh Date: Wed Sep 13 16:58:30 2017 New Revision: 252430 URL: https://gcc.gnu.org/viewcvs?rev=252430=gcc=rev Log: PR c/81117 - Improve buffer overflow checking in strncpy - part 1 gcc/ChangeLog:

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

2017-08-17 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

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

2017-08-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #6 from Martin Sebor --- Author: msebor Date: Mon Aug 14 20:21:44 2017 New Revision: 251100 URL: https://gcc.gnu.org/viewcvs?rev=251100=gcc=rev Log: PR c/81117 - Improve buffer overflow checking in strncpy - part 2 gcc/ChangeLog:

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

2017-08-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #5 from Martin Sebor --- Author: msebor Date: Mon Aug 14 18:35:13 2017 New Revision: 251098 URL: https://gcc.gnu.org/viewcvs?rev=251098=gcc=rev Log: PR c/81117 - Improve buffer overflow checking in strncpy - part 1 gcc/ChangeLog:

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

2017-07-08 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #4 from Martin Sebor

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

2017-06-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 Martin Sebor changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

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

2017-06-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 Martin Sebor changed: What|Removed |Added Keywords||diagnostic

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

2017-06-17 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81117 --- Comment #1 from Daniel Fruzynski --- In this case this code will lead to buffer overflows, but in general case it often may work fine. However this is still error in code, and it would be good if gcc could