mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdeModulePkg/UsbBusDxe: Add missing "return NULL" in UsbCreateDesc()
When (Len < Offset) is TRUE, indicating the data to visit is beyond the boundary, the error message is printed but the function doesn't return NULL. It's a typo when modifying the commit 4c034bf62. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
c09b254bdc
commit
c87ac38cf2
@ -229,6 +229,7 @@ UsbCreateDesc (
|
||||
//
|
||||
if (Len < Offset) {
|
||||
DEBUG ((DEBUG_ERROR, "UsbCreateDesc: met mal-format descriptor, Offset/Len = %d/%d!\n", Offset, Len));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((Head->Type != Type) || (Head->Len < DescLen)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user