Fix a panic in pseudofs(9) that could occur when doing an I/O
operation with a large request or large offset. Reported by: Joel Ray Holveck <joelh@piquan.org> Submitted by: des
This commit is contained in:
parent
788d9119de
commit
a96542610a
@ -525,6 +525,11 @@ pfs_read(struct vop_read_args *va)
|
||||
PRELE(proc);
|
||||
PFS_RETURN (EINVAL);
|
||||
}
|
||||
if (buflen > MAXPHYS) {
|
||||
if (proc != NULL)
|
||||
PRELE(proc);
|
||||
PFS_RETURN (EIO);
|
||||
}
|
||||
sb = sbuf_new(sb, NULL, buflen, 0);
|
||||
if (sb == NULL) {
|
||||
if (proc != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user