mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Copy my newly introduced l_len<0 'oops' fix from kern_lockf.c
This commit is contained in:
parent
62be011ebd
commit
ea4313e351
1 changed files with 4 additions and 2 deletions
|
|
@ -1008,10 +1008,12 @@ smbfs_advlock(ap)
|
|||
if (start < 0)
|
||||
return EINVAL;
|
||||
if (fl->l_len < 0) {
|
||||
start += fl->l_len;
|
||||
if (start <= 0)
|
||||
if (start == 0)
|
||||
return EINVAL;
|
||||
end = start - 1;
|
||||
start += fl->l_len;
|
||||
if (start < 0)
|
||||
return EINVAL;
|
||||
} else if (fl->l_len == 0)
|
||||
end = -1;
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue