Page MenuHomeFreeBSD

syslogd: Fix issues reported by gcc
ClosedPublic

Authored by markj on Fri, Nov 29, 7:52 PM.
Tags
None
Referenced Files
F106158815: D47844.id.diff
Thu, Dec 26, 8:51 AM
F106155951: D47844.id147229.diff
Thu, Dec 26, 7:44 AM
F106140402: D47844.diff
Thu, Dec 26, 1:47 AM
Unknown Object (File)
Sat, Dec 14, 12:57 PM
Unknown Object (File)
Sat, Dec 7, 4:24 PM
Unknown Object (File)
Wed, Dec 4, 1:29 AM
Unknown Object (File)
Sat, Nov 30, 6:52 PM
Subscribers

Details

Summary
  • When forwaring a message, don't assume that f->f_num_addr_fds > 0.
  • Avoid calling free() on a stack-allocated object.

Fixes: f4b4a10abb26 ("syslogd: Move selector parsing into its own function")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60880
Build 57764: arc lint + arc unit

Event Timeline

markj requested review of this revision.Fri, Nov 29, 7:52 PM
jfree added inline comments.
usr.sbin/syslogd/syslogd.c
1798

I think f_num_addr_fds should always be greater than 0 here (since the filed would be invalid if it didn't have any target addresses), but this certainly does not hurt. LGTM

This revision is now accepted and ready to land.Sat, Nov 30, 4:18 PM
This revision was automatically updated to reflect the committed changes.