opnsense-src/sbin/mount
Jason A. Harmening 6584e5a1c5 mount(8): Avoid truncation when fstab-formatting unionfs mount info
When displaying unionfs mounts in fstab format (`mount -p`), mount(8)
currently uses strlcpy to remove the disposition prefix from the mount
name returned by getmntinfo(3).  But strlcpy, like strcpy before it,
does not guarantee correct behavior if the source and destination
buffers overlap.

Just offset the buffer and avoid the destructive copy in the first
place.

PR:		283420
Reviewed by:	imp (previous version), olce
Differential Revision: https://reviews.freebsd.org/D48177

(cherry picked from commit a314c60625af1829b7e12c3a4cedb74d7f69d074)
2025-01-09 00:10:00 -06:00
..
extern.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
getmntopts.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mntopts.3 Fix "version introduced" in numerous manual pages 2024-01-15 10:20:56 -05:00
mntopts.h Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:23 -06:00
mount.8 sbin/{ffsinfo,mount,newfs}: reference ffs(4) in man pages 2024-11-25 23:05:11 +01:00
mount.c mount(8): Avoid truncation when fstab-formatting unionfs mount info 2025-01-09 00:10:00 -06:00
mount_fs.c Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
pathnames.h Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:23 -06:00
vfslist.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00