HomeFreeBSD

tunefs: clear the entire previous label when setting a new one

Description

tunefs: clear the entire previous label when setting a new one

strlcpy(3) null terminates but does not zero-fill the buffer, so would
leave beind any portion of the previous volume label longer than the
new one.

Note that tunefs only allows -L args up to a length of MAXVOLLEN-1, so
the stored label will be null-terminated (whether or not required by
UFS).

Reviewed by: imp
Sponsored by: The FreeBSD Foundation

Details

Provenance
emasteAuthored on
Reviewer
imp
Parents
rS296467: Convert all panics from the link_elf_obj kernel linker for object
Branches
Unknown
Tags
Unknown