diff options
author | ache <ache@FreeBSD.org> | 2001-08-23 17:12:42 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-08-23 17:12:42 +0000 |
commit | 640689c04dbd2de4f7dbb7f9a56d614f31ab8fad (patch) | |
tree | 02d0d070339bcc7a02fa6cc4a778cdb6c07fa0d2 /sys/fs/smbfs | |
parent | 661af8586d3e565fb13cd14995c091f815ea4d87 (diff) | |
download | FreeBSD-src-640689c04dbd2de4f7dbb7f9a56d614f31ab8fad.zip FreeBSD-src-640689c04dbd2de4f7dbb7f9a56d614f31ab8fad.tar.gz |
Copy yet one check for SEEK_END overflow
Diffstat (limited to 'sys/fs/smbfs')
-rw-r--r-- | sys/fs/smbfs/smbfs_vnops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index 286832f..011851b 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -998,7 +998,8 @@ smbfs_advlock(ap) break; case SEEK_END: /* 'size' is always >= 0 */ - if (fl->l_start > 0 && size > OFF_MAX - fl->l_start) + if ((fl->l_start > 0 && size > OFF_MAX - fl->l_start) || + (fl->l_start < 0 && size + fl->l_start > OFF_MAX)) return EOVERFLOW; start = fl->l_start + size; break; |