GP-6717: Implement a safe pattern around Class.forName

This commit is contained in:
Dan
2026-05-27 14:48:52 +00:00
parent 1790e88d43
commit 7789fd45d3
34 changed files with 312 additions and 293 deletions

View File

@@ -40,8 +40,7 @@ public class JythonScriptProvider extends AbstractPythonScriptProvider {
throws GhidraScriptLoadException {
try {
Class<?> clazz = Class.forName(JythonScript.class.getName());
GhidraScript script = (GhidraScript) clazz.getConstructor().newInstance();
GhidraScript script = new JythonScript();
script.setSourceFile(sourceFile);
return script;
}