Bug 209730 - databases/db5: enable TCL option (compiler warnings clean)
Summary: databases/db5: enable TCL option (compiler warnings clean)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthias Andree
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 09:43 UTC by Pietro Cerutti
Modified: 2016-05-24 21:27 UTC (History)
0 users

See Also:
mandree: maintainer-feedback+


Attachments
Enable TCL, warnings-clean (5.86 KB, patch)
2016-05-24 09:43 UTC, Pietro Cerutti
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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