freebsd-src/usr.sbin/fstyp
Mark Johnston 878ede1a0d 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
2024-10-28 15:03:53 +00:00
..
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
apfs.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
befs.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
cd9660.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
exfat.c usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
ext2fs.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
fstyp.8 man filesystems: fix xrefs after move to section 4 2024-05-16 10:25:29 -06:00
fstyp.c usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
fstyp.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
geli.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
hammer2_disk.h usr.sbin: Remove repeated words 2024-04-11 11:53:37 -06:00
hammer2.c fstyp: Fix some memory safety bugs 2024-10-28 15:03:53 +00:00
hammer_disk.h Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:23 -06:00
hammer.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
hfsplus.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
Makefile zfs: merge openzfs/zfs@b10992582 2024-09-09 18:13:02 +02:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
msdosfs.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
msdosfs.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
ntfs.c fstyp: Fix some memory safety bugs 2024-10-28 15:03:53 +00:00
ufs.c usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
zfs.c usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00