Allocate memory before copying a buffer
已通過所有檢查
Builds / ExectOS (i686) (push) Successful in 34s
Builds / ExectOS (amd64) (push) Successful in 36s

此提交包含在:
2024-04-29 22:39:32 +02:00
父節點 ab618f95b9
當前提交 0756eb9b29

查看文件

@@ -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 */