}␊ |
␊ |
␊ |
//unsigned long Mkext_Alder32( unsigned char * buffer, long length );␊ |
unsigned long Mkext_Alder32( unsigned char * buffer, long length );␊ |
␊ |
void KextPatcher_hook(void* current, void* arg2, void* arg3, void* arg4);␊ |
␊ |
|
( MKEXT_GET_SIGNATURE(package)␉!= MKEXT_SIGN ) ||␊ |
( MKEXT_GET_LENGTH(package)␉␉> kLoadSize )␉ ||␊ |
( MKEXT_GET_CHECKSUM(package) !=␊ |
␉␉ Adler32((unsigned char *)&package->version, MKEXT_GET_LENGTH(package) - 0x10) ) )␊ |
␉␉ Mkext_Alder32((unsigned char *)&package->version, MKEXT_GET_LENGTH(package) - 0x10) ) )␊ |
{␊ |
return;␊ |
␉␉// Don't try to patch a b␊ |
|
␉␉␉␉␊ |
␉␉␉␉// re alder32 the new mkext2 package␊ |
␉␉␉␉MKEXT_HDR_CAST(package)->adler32 = ␊ |
␉␉␉␉␉MKEXT_SWAP(Adler32((unsigned char *)&package->version,␊ |
␉␉␉␉␉MKEXT_SWAP(Mkext_Alder32((unsigned char *)&package->version,␊ |
␉␉␉␉␉␉␉␉␉␉␉ MKEXT_GET_LENGTH(package) - 0x10));␊ |
␉␉␉}␊ |
␉␉}␊␊ |