diff options
Diffstat (limited to 'fs/ncpfs/ioctl.c')
-rw-r--r-- | fs/ncpfs/ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c index 79b113048eac..0a3f9b594602 100644 --- a/fs/ncpfs/ioctl.c +++ b/fs/ncpfs/ioctl.c | |||
@@ -525,6 +525,8 @@ static long __ncp_ioctl(struct inode *inode, unsigned int cmd, unsigned long arg | |||
525 | switch (rqdata.cmd) { | 525 | switch (rqdata.cmd) { |
526 | case NCP_LOCK_EX: | 526 | case NCP_LOCK_EX: |
527 | case NCP_LOCK_SH: | 527 | case NCP_LOCK_SH: |
528 | if (rqdata.timeout < 0) | ||
529 | return -EINVAL; | ||
528 | if (rqdata.timeout == 0) | 530 | if (rqdata.timeout == 0) |
529 | rqdata.timeout = NCP_LOCK_DEFAULT_TIMEOUT; | 531 | rqdata.timeout = NCP_LOCK_DEFAULT_TIMEOUT; |
530 | else if (rqdata.timeout > NCP_LOCK_MAX_TIMEOUT) | 532 | else if (rqdata.timeout > NCP_LOCK_MAX_TIMEOUT) |