returning buffer_overflow instead of too_small

This commit is contained in:
Olga Kornievskaia 2012-03-20 16:51:49 -04:00 committed by unknown
parent 83cab313f0
commit 4bfb05adac

View file

@ -4141,8 +4141,10 @@ NTSTATUS nfs41_QueryVolumeInformation(
if (pVNetRootContext->FsAttrsLen) {
const LONG len = pVNetRootContext->FsAttrsLen;
if (RxContext->Info.LengthRemaining < len) {
RxContext->InformationToReturn = len;
status = STATUS_BUFFER_TOO_SMALL;
RtlCopyMemory(RxContext->Info.Buffer,
pVNetRootContext->FsAttrs,
RxContext->Info.LengthRemaining);
status = STATUS_BUFFER_OVERFLOW;
goto out;
}
RtlCopyMemory(RxContext->Info.Buffer,