From: Benny Halevy Date: Thu, 29 May 2008 09:56:08 +0000 (+0300) Subject: nfsd: make nfs4xdr WRITEMEM safe against zero count X-Git-Tag: v2.6.27-rc1~961^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13b1867cacbfe6d8203f432996bd8a2ee6b04e79;p=pandora-kernel.git nfsd: make nfs4xdr WRITEMEM safe against zero count WRITEMEM zeroes the last word in the destination buffer for padding purposes, but this must not be done if no bytes are to be copied, as it would result in zeroing of the word right before the array. The current implementation works since it's always called with non zero nbytes or it follows an encoding of the string (or opaque) length which, if equal to zero, can be overwritten with zero. Nevertheless, it seems safer to check for this case. Signed-off-by: Benny Halevy Signed-off-by: J. Bruce Fields --- Reading git-diff-tree failed