Issue (Feature) #365 Search in memory: Filter fake SWFs: implemented

This commit is contained in:
Honfika
2013-12-23 16:16:00 +01:00
parent a09c7f7474
commit 11ee052e33
4 changed files with 195 additions and 3 deletions

View File

@@ -406,6 +406,16 @@ public final class SWF {
assignExportNamesToSymbols();
assignClassesToSymbols();
findFileAttributes();
} else {
boolean hasNonUnknownTag = false;
for (Tag tag : tags) {
if(tag.getData(version).length > 0 && Tag.getRequiredTags().contains(tag.getId())) {
hasNonUnknownTag = true;
}
}
if (!hasNonUnknownTag) {
throw new IOException("Invalid SWF file. No known tag found.");
}
}
}