|
33 | 33 | import soot.jimple.infoflow.android.InfoflowAndroidConfiguration.CallbackAnalyzer; |
34 | 34 | import soot.jimple.infoflow.android.SetupApplication; |
35 | 35 | import soot.jimple.infoflow.android.config.XMLConfigurationParser; |
| 36 | +import soot.jimple.infoflow.android.resources.ARSCFileParser; |
36 | 37 | import soot.jimple.infoflow.methodSummary.data.provider.LazySummaryProvider; |
37 | 38 | import soot.jimple.infoflow.methodSummary.taintWrappers.ReportMissingSummaryWrapper; |
38 | 39 | import soot.jimple.infoflow.methodSummary.taintWrappers.SummaryTaintWrapper; |
@@ -103,6 +104,7 @@ public class MainClass { |
103 | 104 | private static final String OPTION_MAX_CALLBACKS_DEPTH = "md"; |
104 | 105 | private static final String OPTION_PATH_SPECIFIC_RESULTS = "ps"; |
105 | 106 | private static final String OPTION_MAX_THREAD_NUMBER = "mt"; |
| 107 | + private static final String OPTION_LENIENT_PARSING_MODE = "lp"; |
106 | 108 |
|
107 | 109 | // Inter-component communication |
108 | 110 | private static final String OPTION_ICC_MODEL = "im"; |
@@ -249,6 +251,8 @@ private void initializeCommandLineOptions() { |
249 | 251 | options.addOption(OPTION_CALLGRAPH_FILE, "callgraphdir", true, |
250 | 252 | "The file in which to store and from which to read serialized callgraphs"); |
251 | 253 | options.addOption(OPTION_CALLGRAPH_ONLY, "callgraphonly", false, "Only compute the callgraph and terminate"); |
| 254 | + options.addOption(OPTION_LENIENT_PARSING_MODE, "lenientparsing", false, |
| 255 | + "Enables non-strict parsing, i.e. tries to continue rather than fail in case of a parsing error"); |
252 | 256 | } |
253 | 257 |
|
254 | 258 | public static void main(String[] args) throws Exception { |
@@ -883,6 +887,9 @@ private void parseCommandLineOptions(CommandLine cmd, InfoflowAndroidConfigurati |
883 | 887 | config.setExcludeSootLibraryClasses(false); |
884 | 888 | config.setIgnoreFlowsInSystemPackages(false); |
885 | 889 | } |
| 890 | + if (cmd.hasOption(OPTION_LENIENT_PARSING_MODE)) { |
| 891 | + ARSCFileParser.STRICT_MODE = false; |
| 892 | + } |
886 | 893 |
|
887 | 894 | // Callgraph-specific options |
888 | 895 | if (cmd.hasOption(OPTION_CALLGRAPH_ONLY)) |
|
0 commit comments