Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nfsd: more careful input validation in nfsctl write methods
Neil Brown points out that we're checking buf[size-1] in a couple places without first checking whether size is zero. Actually, given the implementation of simple_transaction_get(), buf[-1] is zero, so in both of these cases the subsequent check of the value of buf[size-1] will catch this case. But it seems fragile to depend on that, so add explicit checks for this case. Signed-off-by: J. Bruce Fields <[email protected]> Acked-by: NeilBrown <[email protected]>
- Loading branch information