fix: stackoverflow on circular importassets (#2666)

Fixes #2666
This commit is contained in:
Jindra Petřík
2026-03-10 22:31:45 +01:00
parent 735dc148e6
commit a52126472a
5 changed files with 43 additions and 6 deletions

View File

@@ -1474,6 +1474,8 @@ public class Main {
private boolean yestoall = false;
private boolean notoall = false;
private List<String> processedUrls = new ArrayList<>();
private SWF open(InputStream is, String file, String fileTitle) throws IOException, InterruptedException {
final CancellableWorker worker = this;
@@ -1513,8 +1515,14 @@ public class Main {
}
}
}, Configuration.parallelSpeedUp.get(), false, true, new UrlResolver() {
@Override
public boolean doIgnoreUrl(String basePath, String url) {
return processedUrls.contains(basePath + "|" + url);
}
@Override
public SWF resolveUrl(String file, final String url) {
processedUrls.add(file + "|" + url);
loadedUrls.add(url);
File selFile = null;
int opt = -1;