修复 CallObfus生成Dispatch函数对被调用排序造成调用到错误函数的严重bug
parent
9505f2b90f
commit
025f900f4e
|
@ -284,7 +284,7 @@ namespace Obfuz.ObfusPasses.CallObfus
|
||||||
var ret = Instruction.Create(OpCodes.Ret);
|
var ret = Instruction.Create(OpCodes.Ret);
|
||||||
|
|
||||||
// sort methods by signature to ensure stable order
|
// sort methods by signature to ensure stable order
|
||||||
dispatchMethod.methods.Sort((a, b) => a.id.CompareTo(b.id));
|
//dispatchMethod.methods.Sort((a, b) => a.id.CompareTo(b.id));
|
||||||
foreach (CallInfo ci in dispatchMethod.methods)
|
foreach (CallInfo ci in dispatchMethod.methods)
|
||||||
{
|
{
|
||||||
var callTargetMethod = Instruction.Create(ci.callVir ? OpCodes.Callvirt : OpCodes.Call, ci.method);
|
var callTargetMethod = Instruction.Create(ci.callVir ? OpCodes.Callvirt : OpCodes.Call, ci.method);
|
||||||
|
|
Loading…
Reference in New Issue