Page MenuHomeFreeBSD

pax: Clear arcn in each read function.
ClosedPublic

Authored by des on Jul 24 2024, 11:54 AM.
Tags
None
Referenced Files
F97972372: D46097.id141327.diff
Tue, Oct 1, 9:56 PM
Unknown Object (File)
Tue, Oct 1, 7:20 AM
Unknown Object (File)
Wed, Sep 25, 2:04 PM
Unknown Object (File)
Sun, Sep 22, 12:48 AM
Unknown Object (File)
Thu, Sep 19, 8:03 PM
Unknown Object (File)
Tue, Sep 10, 2:20 AM
Unknown Object (File)
Aug 30 2024, 10:21 AM
Unknown Object (File)
Aug 30 2024, 10:21 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.