Page MenuHomeFreeBSD

pax: Clear arcn in each read function.
ClosedPublic

Authored by des on Jul 24 2024, 11:54 AM.
Tags
None
Referenced Files
F103042921: D46097.id141327.diff
Wed, Nov 20, 4:45 AM
F103037133: D46097.id141307.diff
Wed, Nov 20, 3:04 AM
F103033325: D46097.diff
Wed, Nov 20, 1:57 AM
Unknown Object (File)
Sun, Nov 3, 4:03 PM
Unknown Object (File)
Thu, Oct 31, 6:24 PM
Unknown Object (File)
Thu, Oct 24, 5:56 AM
Unknown Object (File)
Oct 19 2024, 4:47 AM
Unknown Object (File)
Oct 18 2024, 2:46 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 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.