Page MenuHomeFreeBSD

pax: Clear arcn in each read function.
ClosedPublic

Authored by des on Jul 24 2024, 11:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 2:00 AM
Unknown Object (File)
Wed, Oct 1, 2:16 PM
Unknown Object (File)
Tue, Sep 16, 8:21 PM
Unknown Object (File)
Sep 14 2025, 12:43 AM
Unknown Object (File)
Sep 11 2025, 7:52 AM
Unknown Object (File)
Sep 9 2025, 5:08 PM
Unknown Object (File)
Sep 3 2025, 1:05 PM
Unknown Object (File)
Aug 31 2025, 11:44 AM
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 Not Applicable
Unit
Tests Not Applicable

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.