Skip to content

Commit 0c7605d

Browse files
wujiayang2007RandomCrocodile
authored andcommitted
修复控制流保护在#153的错误
注意到 mkaring 在 1.4.0版本中对控制流保护做出了误操作(272行) 将src => statementLast.Contains(src),错误修改成了src => !statementLast.Contains(src),导致了保护后的程序出现了错误的循环,这里特此做出修复!
1 parent 8dee81d commit 0c7605d

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

Confuser.Protections/ControlFlow/SwitchMangler.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,16 +260,8 @@ public override void Mangle(CilBody body, ScopeBlock root, CFContext ctx) {
260260
src.Offset >= block.Instructions.Last().Offset))
261261
return true;
262262

263-
// Disable flow obfuscation for blocks reached by jump instructions.
264-
// Bug in #153 caused exactly this behaviour, expect for allowing wrong jump instructions
265-
// There is another issue present here tracked here:
266-
// https://github.com/mkaring/ConfuserEx/issues/162
267-
// Until this issue is resolved, the ctrl flow obfuscation will be severely reduced.
268-
if (srcs.Any())
269-
return true;
270-
271263
// Not targeted by the last of statements
272-
if (srcs.Any(src => !statementLast.Contains(src)))
264+
if (srcs.Any(src => statementLast.Contains(src)))
273265
return true;
274266
}
275267
return false;

0 commit comments

Comments
 (0)