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)
Sat, Jan 4, 8:51 AM
Unknown Object (File)
Nov 25 2024, 7:41 AM
Unknown Object (File)
Nov 20 2024, 4:45 AM
Unknown Object (File)
Nov 20 2024, 3:04 AM
Unknown Object (File)
Nov 20 2024, 1:57 AM
Unknown Object (File)
Nov 3 2024, 4:03 PM
Unknown Object (File)
Oct 31 2024, 6:24 PM
Unknown Object (File)
Oct 24 2024, 5:56 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 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.