code-intelligence.com/cifuzz@v0.40.0/examples/gradle-kotlin/src/main/kotlin/com/example/ExploreMe.kt (about) 1 class ExploreMe(private val a: Int) { 2 // Function with multiple paths that can be discovered by a fuzzer. 3 fun exploreMe(b: Int, c: String) { 4 if (a >= 20000) { 5 if (b >= 2000000) { 6 if (b - a < 100000) { 7 // Trigger Remote Code Execution Bug 8 if (c.startsWith("@")) { 9 val className = c.substring(1) 10 try { 11 Class.forName(className).newInstance() 12 } catch (ex: Exception) { 13 when(ex) { 14 is ClassNotFoundException, is InstantiationException, is IllegalAccessException -> { 15 // ignore 16 } 17 else -> throw ex 18 } 19 } 20 } 21 } 22 } 23 } 24 } 25 }