Page MenuHomeFreeBSD

pax: Clear arcn in each read function.
ClosedPublic

Authored by des on Jul 24 2024, 11:54 AM.
Tags
None
Referenced Files
F175009833: D46097.diff
Wed, Oct 7, 2:51 PM
Unknown Object (File)
Mon, Oct 5, 9:34 AM
Unknown Object (File)
Sat, Oct 3, 1:24 AM
Unknown Object (File)
Wed, Sep 30, 1:06 AM
Unknown Object (File)
Tue, Sep 22, 4:12 AM
Unknown Object (File)
Sep 1 2026, 10:12 PM
Unknown Object (File)
Aug 30 2026, 8:44 AM
Unknown Object (File)
Aug 28 2026, 6:10 PM
Subscribers

Details

Summary

Instead of initializing individual fields to zero, clear the entire
struct prior to populating it.

MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

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

Event Timeline

des requested review of this revision.Jul 24 2024, 11:54 AM
markj added inline comments.
bin/pax/cpio.c
277

Same below.

bin/pax/tar.c
734

Here we are writing to the arcn->name buffer. To match the old behaviour we should clear it again after this point, no?

Looks ok aside from the style nits.

bin/pax/tar.c
734

Oh, never mind, I'm mixing up arcn->name and arcn->ln_name.

This revision is now accepted and ready to land.Jul 24 2024, 1:37 PM
0mp added inline comments.
bin/pax/tar.c
734

But in the old version of this file we do not clear the arcn->name after this point. Am I missing something?

This revision was automatically updated to reflect the committed changes.