In nfsrv_getstream(), ns_reclen will never be negative due to the

previous assignment (recmark & ~0x80000000).
Pointed out by Christos.
This commit is contained in:
rpaulo 2006-03-01 19:38:29 +00:00
parent 6e5dbc3f2f
commit 52dc289cfd
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_socket.c,v 1.124 2006/03/01 15:30:12 rpaulo Exp $ */
/* $NetBSD: nfs_socket.c,v 1.125 2006/03/01 19:38:29 rpaulo Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.124 2006/03/01 15:30:12 rpaulo Exp $");
__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.125 2006/03/01 19:38:29 rpaulo Exp $");
#include "fs_nfs.h"
#include "opt_nfs.h"
@ -2422,7 +2422,7 @@ nfsrv_getstream(slp, waitflag)
else
slp->ns_flag &= ~SLP_LASTFRAG;
if (slp->ns_reclen > NFS_MAXPACKET
|| slp->ns_reclen <= 0) {
|| slp->ns_reclen == 0) {
error = EPERM;
break;
}