From: erictian Date: Wed, 19 Oct 2011 05:15:23 +0000 (+0000) Subject: If the data buffer described by InDataBuffer/OutDataBuffer and InTransferLength/OutTr... X-Git-Tag: edk2-stable201903~14052 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=9e70c18b1f147c0d33d7d2c7d14dd0d9ac8fb765;p=mirror_edk2.git If the data buffer described by InDataBuffer/OutDataBuffer and InTransferLength/OutTransferLength is too big to be transferred, EFI_BAD_BUFFER_SIZE should be returned Signed-off-by:erictian Reviewed-by:li-elvin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12549 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c index b83babf081..6c8d4b2df6 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c @@ -656,7 +656,7 @@ AhciPioTransfer ( ); if (EFI_ERROR (Status) || (DataCount != MapLength)) { - return EFI_OUT_OF_RESOURCES; + return EFI_BAD_BUFFER_SIZE; } // @@ -877,7 +877,7 @@ AhciDmaTransfer ( ); if (EFI_ERROR (Status) || (DataCount != MapLength)) { - return EFI_OUT_OF_RESOURCES; + return EFI_BAD_BUFFER_SIZE; } if (Task != NULL) {