Skip to content

Commit 40dd8e3

Browse files
committed
memzero for c operator
1 parent 42f4896 commit 40dd8e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Plugins/UnrealJS/Source/V8/Private/JavascriptIsolate_Private.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,9 @@ class FJavascriptIsolateImplementation : public FJavascriptIsolate
14861486
if (Value->IsObject())
14871487
{
14881488
auto v = Value->ToObject();
1489-
auto Target = (uint8*)(FMemory_Alloca(ScriptStruct->GetStructureSize()));
1489+
auto Size = ScriptStruct->GetStructureSize();
1490+
auto Target = (uint8*)(FMemory_Alloca(Size));
1491+
FMemory::Memzero(Target, Size);
14901492
ReadOffStruct(v, ScriptStruct, Target);
14911493
return ExportStructInstance(ScriptStruct, Target, FNoPropertyOwner());
14921494
}

0 commit comments

Comments
 (0)