Created attachment 170594 [details] Enable TCL, warnings-clean This is a followup to bug #208740. I checked the strncat(3) warnings on the Tcl bindings code and back-ported the fixes from db6. The strncat(3) invocations weren't harmful in practice.
Comment on attachment 170594 [details] Enable TCL, warnings-clean Is there any reason why we are not just doing s/strncat/strlcat/ on these particular lines? strncat(buffer, "xxx", 0) will still write a 0 byte according to its documentation, strlcat will not.
Thanks, committed anyhow, for non-zero buffer sizes that have at least one NUL byte anywhere in the buffer, this should still be safe. Thanks.
A commit references this bug: Author: mandree Date: Tue May 24 21:26:12 UTC 2016 New revision: 415812 URL: https://svnweb.freebsd.org/changeset/ports/415812 Log: Fix strncat() misuse, and enable TCL option. PR: 209730 Submitted by: gahr@ Changes: head/databases/db5/Makefile head/databases/db5/files/patch-lang_tcl_tcl__db.c head/databases/db5/files/patch-lang_tcl_tcl__env.c head/databases/db5/files/patch-lang_tcl_tcl__seq.c