Skip to content

Commit 171410e

Browse files
committed
avoiding null pointer exception
1 parent c84dca0 commit 171410e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ scalaVersion := "2.12.8"
33
name := "svfa-scala"
44
organization := "br.unb.cic"
55

6-
version := "0.2.2"
6+
version := "0.2.3"
77

88
githubOwner := "rbonifacio"
99
githubRepository := "svfa-scala"

src/main/scala/br/unb/cic/soot/svfa/jimple/JSVFA.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,17 @@ abstract class JSVFA extends SVFA with Analysis with FieldSensitiveness with Obj
4646
trait CopyFromMethodArgumentToBaseObject extends RuleAction {
4747
def from: Int
4848

49-
def apply(sootMethod: SootMethod, invokeStmt: jimple.Stmt, localDefs: SimpleLocalDefs) = {
49+
def apply(sootMethod: SootMethod, invokeStmt: jimple.Stmt, localDefs: SimpleLocalDefs): Unit = {
5050
var srcArg: Value = null
5151
var expr: InvokeExpr = null
5252

5353
try{
5454
srcArg = invokeStmt.getInvokeExpr.getArg(from)
5555
expr = invokeStmt.getInvokeExpr
5656
}catch {
57-
case e: Exception=>
58-
srcArg = invokeStmt.getInvokeExpr.getArg(from)
59-
expr = invokeStmt.getInvokeExpr
60-
println("Entrou com errro!")
57+
case e: Throwable =>
58+
println(e.printStackTrace())
59+
return
6160
}
6261
if(hasBaseObject(expr) && srcArg.isInstanceOf[Local]) {
6362
val local = srcArg.asInstanceOf[Local]

0 commit comments

Comments
 (0)