Allocate memory before copying a buffer
This commit is contained in:
parent
ab618f95b9
commit
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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user