Skip to content

Commit

Permalink
fixing exceptions thrown, about #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Faridah Akinotcho committed Apr 15, 2024
1 parent 4fdb8cf commit cf84708
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 21 deletions.
4 changes: 2 additions & 2 deletions FlowDroid/soot-infoflow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@
</build>

<repositories>
<repository>
<!--repository>
<id>Soot-Snapshots</id>
<url>https://ssebuild.sit.fraunhofer.de/nexus/repository/Soot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repository-->
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
Expand Down
7 changes: 6 additions & 1 deletion GoalExplorer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
<id>mavenCentral</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<!--repository>
<id>in-project</id>
<name>In Project Repo</name>
<url>file://${project.basedir}/
</repository-->
</repositories>

<build>
Expand Down Expand Up @@ -216,7 +221,7 @@
<dependency>
<groupId>de.upb.cs.swt</groupId>
<artifactId>heros</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ public Map<Integer, List<Unit>> performBranchedAnalysis(){
if(stmt.containsInvokeExpr()){
if (invokesMethodOfInterest(stmt.getInvokeExpr())){
Logger.debug("Found invocation of method of interest {} in {}", methodToSwitchOver, stmt);
DefinitionStmt definitionStmt = (DefinitionStmt)stmt; //double check
registerToSwitchOver = definitionStmt.getLeftOp();
if(stmt instanceof DefinitionStmt){
DefinitionStmt definitionStmt = (DefinitionStmt)stmt; //double check
registerToSwitchOver = definitionStmt.getLeftOp();
}
else{
Logger.debug("Issue: found method of interest but no assignment");
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Set<Unit> getInitialSeeds() {
}

@Override
protected MeetLattice<BasePropagationValue> createJoinLattice() {
protected MeetLattice<BasePropagationValue> createMeetLattice() {
return new PropagationLattice();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public AbstractComponent(String name, String packageName){
}

public AbstractComponent(AXmlNode node, String packageName) {
this.name = processNodeName(node, packageName);
this.name = processNodeName(node, packageName); //TODO deal with disabled components, currently included
if(this.name.length() < packageName.length()){
Logger.error("Issue with app name {} and package name {}", name, packageName);
setShortName(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ public class AxmlUtils {
public static String processNodeName(AXmlNode node, String packageName){
String className = null;
AXmlAttribute<?> attrEnabled = node.getAttribute("enabled");
if (attrEnabled == null || !attrEnabled.getValue().equals(Boolean.FALSE)) {
//if (attrEnabled == null || !attrEnabled.getValue().equals(Boolean.FALSE)) {
// process name
AXmlAttribute<?> attrName = node.getAttribute("name");
if (attrName != null){
className = expandClassName((String) attrName.getValue(), packageName);
} else {
// This component does not have a name, so this might be
// obfuscated malware. We apply a heuristic.
for (Map.Entry<String, AXmlAttribute<?>> a : node.getAttributes().entrySet())
if (a.getValue().getName().isEmpty() && a.getValue().getType() == AxmlVisitor.TYPE_STRING) {
String name = (String) a.getValue().getValue();
if (isValidComponentName(name))
className = expandClassName(name, packageName);
}
}
AXmlAttribute<?> attrName = node.getAttribute("name");
if (attrName != null){
className = expandClassName((String) attrName.getValue(), packageName);
} else {
// This component does not have a name, so this might be
// obfuscated malware. We apply a heuristic.
for (Map.Entry<String, AXmlAttribute<?>> a : node.getAttributes().entrySet())
if (a.getValue().getName().isEmpty() && a.getValue().getType() == AxmlVisitor.TYPE_STRING) {
String name = (String) a.getValue().getValue();
if (isValidComponentName(name))
className = expandClassName(name, packageName);
}
}
//}
return className;
}

Expand Down

0 comments on commit cf84708

Please sign in to comment.