HomeFreeBSD

fsck_ffs: Don't overrun mount device buffer

Description

fsck_ffs: Don't overrun mount device buffer

Maybe this case is impossible. Either way, when attempting to "/dev/"-prefix a
non-global device name, check that we do not overrun the f_mntfromname buffer.

In this case, truncating (with strlcpy or similar) would not be useful, since
the f_mntfromname result of getmntpt() is passed directly to open(2) later.

Reported by: Coverity
CID: 1006789
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
cemAuthored on
Parents
rS299459: compat/opensolaris: Don't redefined off64_t if already defined
Branches
Unknown
Tags
Unknown