• B
    nfsd: make nfs4xdr WRITEMEM safe against zero count · 13b1867c
    Benny Halevy 提交于
    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: NBenny Halevy <bhalevy@panasas.com>
    Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
    13b1867c
nfs4xdr.c 68.8 KB