Merge remote-tracking branch 'origin/Ghidra_12.1'

This commit is contained in:
Ryan Kurtz
2026-04-21 10:43:18 -04:00
2 changed files with 24 additions and 5 deletions

View File

@@ -89,9 +89,14 @@ public class ExportTrie {
* @throws IOException if there was an IO-related error
*/
private void parseTrie() throws IOException {
Set<Integer> visited = new HashSet<>();
visited.add(0);
LinkedList<Node> remainingNodes = parseNode("", 0);
while(!remainingNodes.isEmpty()) {
Node parent = remainingNodes.removeFirst();
if (!visited.add(parent.offset())) {
continue; // skip already-visited offsets
}
LinkedList<Node> children = parseNode(parent.name, parent.offset);
for (Node child : children) {
remainingNodes.add(new Node(parent.name + child.name, child.offset));

View File

@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -159,17 +159,31 @@ public class BrowserLoader {
}
String urlString = option.getUrlReplacementString();
String urlArg;
if (urlString.equals(ManualViewerCommandWrappedOption.HTTP_URL_REPLACEMENT_STRING) ||
fileURL == null) {
argumentList.add(url.toExternalForm());
urlArg = url.toExternalForm();
}
else if (urlString.equals(ManualViewerCommandWrappedOption.FILE_URL_REPLACEMENT_STRING)) {
argumentList.add(fileURL.toExternalForm());
urlArg = fileURL.toExternalForm();
}
else {
argumentList.add(new File(fileURL.getFile()).getAbsolutePath());
urlArg = new File(fileURL.getFile()).getAbsolutePath();
}
// If launching "cmd.exe /c start URL", surround the URL with double quotes to protect
// against special characters being misinterpreted by the shell.
// NOTE: If not already present, a double-quoted title must be inserted since the URL
// argument that follows will start with a double quote.
if (commandArguments.length >= 2 && commandArguments[0].equalsIgnoreCase("/c") &&
commandArguments[1].equalsIgnoreCase("start")) {
if (commandArguments.length == 2) {
argumentList.add("\"Title\"");
}
urlArg = '"' + urlArg + '"';
}
argumentList.add(urlArg);
return argumentList.toArray(new String[argumentList.size()]);
}