mirror of https://github.com/acidanthera/audk.git
EmulatorPkg/PosixFileSystem: Add NULL check on memory allocation
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4001 This commit adds NULL check on memory allocation of the size for FileName in ASCII string format at PosixFileSetInfo(). Signed-off-by: Miki Shindo <miki.shindo@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
parent
3b8cee1781
commit
7ef91af84c
|
@ -1187,7 +1187,7 @@ PosixFileSetInfo (
|
|||
}
|
||||
|
||||
OldFileName = malloc (AsciiStrSize (PrivateFile->FileName));
|
||||
if (OldFileInfo == NULL) {
|
||||
if (OldFileName == NULL) {
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue