HomeFreeBSD

fstyp: Fix some memory safety bugs

Description

fstyp: Fix some memory safety bugs

In the hammer2 label reader, make sure to check for a NULL return from
read_buf().

In the NTFS label reader,

  • Avoid an infinite loop if a record length is 0.
  • Avoid walking past the end of the buffer.
  • When a label is found, avoid reading past the end of the buffer.

PR: 278281
Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D47292

Details

Provenance
markjAuthored on Oct 28 2024, 1:51 PM
Reviewer
emaste
Differential Revision
D47292: fstyp: Fix some memory safety bugs
Parents
rG2ac644317e67: iwlwifi,rtw88,rtw89: connect to build again
Branches
Unknown
Tags
Unknown