Bug 201725

Summary: lib/libc/gen/syslog.3: missing priority argument in example code in BUGS section.
Product: Documentation Reporter: Thomas Cort <linuxgeek>
Component: Manual PagesAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: doc, gonzo, pluknet
Priority: --- Keywords: patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
syslog.3.patch none

Description Thomas Cort 2015-07-20 20:52:47 UTC
Created attachment 159029 [details]
syslog.3.patch

The syslog function signature looks like this:

  void syslog(int priority, const char *message, ...);

In the BUGS section of syslog(3), the reader is warned about formatting attacks and it is suggested that the following idiom be used:

  syslog("%s", string);

The example lacks the first int argument (the priority). The attached patch adds the missing 'priority' argument to the example code.
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-07-21 09:45:03 UTC
A commit references this bug:

Author: pluknet
Date: Tue Jul 21 09:44:46 UTC 2015
New revision: 285739
URL: https://svnweb.freebsd.org/changeset/base/285739

Log:
  Add missing priority argument in example code in BUGS section.

  PR:		201725
  Submitted by:	Thomas Cort
  MFC after:	1 week

Changes:
  head/lib/libc/gen/syslog.3
Comment 2 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-21 17:58:15 UTC
There is a commit referencing this PR, but it's still not closed and has been inactive for some time. Closing the PR as fixed but feel free to re-open it if the issue hasn't been completely resolved.

Thanks