@@ -1148,7 +1148,8 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
1148
1148
if (TmpData == NULL || MaskLen == 0 ) {
1149
1149
Patches -> KextPatches [Patches -> NrKexts ].MaskFind = NULL ;
1150
1150
} else {
1151
- Patches -> KextPatches [Patches -> NrKexts ].MaskFind = AllocateZeroPool (FindLen );
1151
+ Patches -> KextPatches [Patches -> NrKexts ].MaskFind = AllocatePool (FindLen );
1152
+ SetMem (Patches -> KextPatches [Patches -> NrKexts ].MaskFind , 0xFF , FindLen );
1152
1153
CopyMem (Patches -> KextPatches [Patches -> NrKexts ].MaskFind , TmpData , MaskLen );
1153
1154
}
1154
1155
FreePool (TmpData );
@@ -1264,7 +1265,8 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
1264
1265
if (TmpData == NULL || MaskLen == 0 ) {
1265
1266
Patches -> KernelPatches [Patches -> NrKexts ].MaskFind = NULL ;
1266
1267
} else {
1267
- Patches -> KernelPatches [Patches -> NrKexts ].MaskFind = AllocateZeroPool (FindLen );
1268
+ Patches -> KernelPatches [Patches -> NrKexts ].MaskFind = AllocatePool (FindLen );
1269
+ SetMem (Patches -> KernelPatches [Patches -> NrKexts ].MaskFind , 0xFF , FindLen );
1268
1270
CopyMem (Patches -> KernelPatches [Patches -> NrKexts ].MaskFind , TmpData , MaskLen );
1269
1271
}
1270
1272
FreePool (TmpData );
@@ -1365,7 +1367,8 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
1365
1367
if (TmpData == NULL || MaskLen == 0 ) {
1366
1368
Patches -> BootPatches [Patches -> NrKexts ].MaskFind = NULL ;
1367
1369
} else {
1368
- Patches -> BootPatches [Patches -> NrKexts ].MaskFind = AllocateZeroPool (FindLen );
1370
+ Patches -> BootPatches [Patches -> NrKexts ].MaskFind = AllocatePool (FindLen );
1371
+ SetMem (Patches -> BootPatches [Patches -> NrKexts ].MaskFind , 0xFF , FindLen );
1369
1372
CopyMem (Patches -> BootPatches [Patches -> NrKexts ].MaskFind , TmpData , MaskLen );
1370
1373
}
1371
1374
FreePool (TmpData );
0 commit comments