Page MenuHomeFreeBSD

savecore: decrease filename buffer sizes
ClosedPublic

Authored by mhorne on Apr 7 2022, 3:04 PM.
Tags
None
Referenced Files
F102102774: D34821.id104725.diff
Thu, Nov 7, 3:44 PM
Unknown Object (File)
Tue, Oct 22, 12:15 PM
Unknown Object (File)
Wed, Oct 9, 6:52 PM
Unknown Object (File)
Sep 18 2024, 5:25 PM
Unknown Object (File)
Sep 18 2024, 4:45 PM
Unknown Object (File)
Sep 18 2024, 6:16 AM
Unknown Object (File)
Sep 17 2024, 6:10 PM
Unknown Object (File)
Sep 16 2024, 11:02 PM
Subscribers

Details

Summary

All files are now created relative to savedirfd, e.g. with openat(2).
Therefore, we do not need character buffers to be PATH_MAX bytes long,
just long enough to hold the complete filename. 32 bytes is long enough
in all cases. These can be allocated on the stack.

While here, fix an error message that attempts to use an uninitialized
infoname.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45053
Build 41941: arc lint + arc unit

Event Timeline

mhorne requested review of this revision.Apr 7 2022, 3:04 PM
mhorne added inline comments.
sbin/savecore/savecore.c
700

Choosing to list the static var first.

markj added inline comments.
sbin/savecore/savecore.c
700

I prefer that too.

703

The keyname declaration fits on the previous line now.

This revision is now accepted and ready to land.Apr 7 2022, 3:32 PM
This revision was automatically updated to reflect the committed changes.