mirror of https://github.com/acidanthera/audk.git
Fixed a bug: when underlayer receives much more data, return EFI_BUFFER_TOO_SMALL.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11132 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
fe295078f2
commit
aaf779a7ec
|
@ -995,6 +995,9 @@ SnpNt32Receive (
|
|||
SNPNT32_INSTANCE_DATA *Instance;
|
||||
SNPNT32_GLOBAL_DATA *GlobalData;
|
||||
INT32 ReturnValue;
|
||||
UINTN BufSize;
|
||||
|
||||
BufSize = *BuffSize;
|
||||
|
||||
Instance = SNP_NT32_INSTANCE_DATA_FROM_SNP_THIS (This);
|
||||
|
||||
|
@ -1042,7 +1045,7 @@ SnpNt32Receive (
|
|||
*Protocol = NTOHS (*((UINT16 *) (((UINT8 *) Buffer) + 12)));
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
return (*BuffSize <= BufSize) ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue