mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
Add more checking to avoid the buffer overflow.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8626 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
841014ba97
commit
f0a3b1a221
@ -41,6 +41,10 @@ IsNvNeed (
|
||||
Ptr++;
|
||||
}
|
||||
|
||||
if ((((UINTN)Ptr - (UINTN)ConVarName) / sizeof (CHAR16)) <= 3) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((*(Ptr - 3) == 'D') && (*(Ptr - 2) == 'e') && (*(Ptr - 1) == 'v')) {
|
||||
return FALSE;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user