Allocate memory before copying a buffer
All checks were successful
Builds / ExectOS (i686) (push) Successful in 34s
Builds / ExectOS (amd64) (push) Successful in 36s

This commit is contained in:
Rafal Kupiec 2024-04-29 22:39:32 +02:00
parent ab618f95b9
commit 0756eb9b29
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -812,8 +812,8 @@ BlpGetModuleInfoStrings(IN PWCHAR SectionData,
return STATUS_EFI_OUT_OF_RESOURCES; return STATUS_EFI_OUT_OF_RESOURCES;
} }
/* Cioy strings read from '.modinfo' section */ /* Allocate memory and copy strings read from '.modinfo' section */
String = (PWCHAR)(Array + Count + 1); BlAllocateMemoryPool(SectionSize, (PVOID*)&String);
RtlCopyMemory(String, InfoStrings, SectionSize); RtlCopyMemory(String, InfoStrings, SectionSize);
/* Make sure last string is NULL-terminated */ /* Make sure last string is NULL-terminated */