HomeFreeBSD

newsyslog: Fix stack corruption when initializing a zipwork structure.

Description

newsyslog: Fix stack corruption when initializing a zipwork structure.

This happens when compressing a previously uncompressed already-rotated
file, as happens when handling the 'p' flag in newsyslog.conf. The file
name is stored in a flexible array member, so these structures cannot be
stack allocated.

Also make sure that we call change_attrs() and do_zipwork() in dry-run
mode; they handle this properly, contrary to the commit log message for
r327451.

CID: 1008168
Github PR: https://github.com/freebsd/freebsd/pull/427
MFC after: 2 weeks
Submitted by: Radek Brich (original version)

Details

Provenance
markjAuthored on Mar 24 2020, 6:16 PM
Parents
rGff4c0e6f83e6: Disable rarely used architecture variants in make universe by default.
Branches
Unknown
Tags
Unknown

Event Timeline