Bug 201725 - lib/libc/gen/syslog.3: missing priority argument in example code in BUGS section.
Summary: lib/libc/gen/syslog.3: missing priority argument in example code in BUGS sect...
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-07-20 20:52 UTC by Thomas Cort
Modified: 2019-01-21 17:58 UTC (History)
3 users (show)

See Also:


Attachments
syslog.3.patch (313 bytes, patch)
2015-07-20 20:52 UTC, Thomas Cort
no flags Details | Diff

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