diff options
| author | Chris Suter <csuter@google.com> | 2026-09-03 05:23:46 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2026-09-03 06:51:19 +0000 |
| commit | 18094609d301540526d3d57e92705bc989d29986 (patch) | |
| tree | cab89b1f61594afdf4eaa374090dde3c52902063 /lib/DebugInfo/CodeView/ModuleDebugLineFragment.cpp | |
| parent | 19b0b1f648d8f114f77e82495618587b1729c4cc (diff) | |
fsck_msdosfs: avoid signed integer overflow in readboot()
readboot() decoded the 32-bit little-endian BIOS Parameter Block and
FSInfo fields by shifting the individual bytes of a u_char array into
place. The u_char operands are promoted to signed int, so shifting a
most significant byte of 0x80 or greater left by 24 overflows int, which
is undefined behavior. Use le32dec() from <sys/endian.h> instead, which
is both well defined and easier to read.
No functional change intended.
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/2350
Diffstat (limited to 'lib/DebugInfo/CodeView/ModuleDebugLineFragment.cpp')
0 files changed, 0 insertions, 0 deletions
