diff --git a/src/main/kotlin/net/bytedance/security/app/util/helper.kt b/src/main/kotlin/net/bytedance/security/app/util/helper.kt index b331d3c..00c76ea 100644 --- a/src/main/kotlin/net/bytedance/security/app/util/helper.kt +++ b/src/main/kotlin/net/bytedance/security/app/util/helper.kt @@ -61,6 +61,7 @@ fun newFunctionSignature(methodSig: String): FunctionSignature { for (i in 1 until methodSig.length - 1) { when (val c = methodSig[i]) { ':' -> if (state != MethodSignatureParseState.Class) { + logErr("Format Error $methodSig") exitProcess(-2) } else { // state = ParseState.Space @@ -80,7 +81,10 @@ fun newFunctionSignature(methodSig: String): FunctionSignature { state = MethodSignatureParseState.FunctionName } - else -> exitProcess(-7) + else -> { + logErr("Format Error $methodSig") + exitProcess(-7) + } } } @@ -91,9 +95,10 @@ fun newFunctionSignature(methodSig: String): FunctionSignature { s = "" } - MethodSignatureParseState.ReturnType -> {} - - else -> exitProcess(-8) + else -> { + logErr("Format Error $methodSig") + exitProcess(-8) + } } } @@ -105,7 +110,10 @@ fun newFunctionSignature(methodSig: String): FunctionSignature { state = MethodSignatureParseState.Argument } - else -> exitProcess(-9) + else -> { + logErr("Format Error $methodSig") + exitProcess(-9) + } } } @@ -116,7 +124,10 @@ fun newFunctionSignature(methodSig: String): FunctionSignature { s = "" } - else -> exitProcess(-10) + else -> { + logErr("Format Error $methodSig") + exitProcess(-10) + } } }