Bug 209730

Summary: databases/db5: enable TCL option (compiler warnings clean)
Product: Ports & Packages Reporter: Pietro Cerutti <gahr>
Component: Individual Port(s)Assignee: Matthias Andree <mandree>
Status: Closed FIXED    
Severity: Affects Only Me Flags: mandree: maintainer-feedback+
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Enable TCL, warnings-clean none

Description Pietro Cerutti freebsd_committer freebsd_triage 2016-05-24 09:43:33 UTC
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 1 Matthias Andree freebsd_committer freebsd_triage 2016-05-24 20:39:37 UTC
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.
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2016-05-24 21:26:52 UTC
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.
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-05-24 21:26:59 UTC
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