HomeFreeBSD

if: Remove unnecessary validation in the SIOCSIFNAME handler

Description

if: Remove unnecessary validation in the SIOCSIFNAME handler

A successful copyinstr() call guarantees that the returned string is
nul-terminated. Furthermore, the removed check would harmlessly compare
an uninitialized byte with '\0' if the new name is shorter than
IFNAMESIZ - 1.

Reported by: KMSAN
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on May 12 2021, 2:05 PM
Parents
rG06d1fd9f42fa: swap_pager: Zero swap info before exporting to userspace
Branches
Unknown
Tags
Unknown