AS2 class detector - ignoring onFalse section, which can lead to invalid location

This commit is contained in:
Jindra Petřík
2018-01-25 21:20:45 +01:00
parent 7baaa1f1ff
commit 205b9cda14

View File

@@ -336,7 +336,13 @@ public class ActionScript2ClassDetector {
try {
if (!ifItem.onFalse.isEmpty()) {
throw new AssertException("else clause of the if is not empty");
//throw new AssertException("else clause of the if is not empty");
//Note: When there is an else block, it may mean
//that the class was too long to fit maximum of
//jump bytes so the jump target is other invalid location
//(usually negative - will probably lead to other SWF tags)
//so we will rather silently ignore onFalse section
}
List<String> classNamePath = pathToSearchInIfCond;
@@ -667,11 +673,6 @@ public class ActionScript2ClassDetector {
}
}
//???? fid 963
if (!ifItem.onFalse.isEmpty()) {
commands.addAll(pos + 1, ifItem.onFalse);
}
// goto next line and check next classes
continue looppos;
} catch (AssertException ex) {