Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-0: Initialing set in RegisterValuesSarifMgr (Closes #8753)

Ryan Kurtzeb9e92522634
diff --git a/Ghidra/Features/Sarif/src/main/java/sarif/managers/RegisterValuesSarifMgr.java b/Ghidra/Features/Sarif/src/main/java/sarif/managers/RegisterValuesSarifMgr.java
index 9f1d561833..76b25b1520 100644
--- a/Ghidra/Features/Sarif/src/main/java/sarif/managers/RegisterValuesSarifMgr.java
+++ b/Ghidra/Features/Sarif/src/main/java/sarif/managers/RegisterValuesSarifMgr.java
@@ -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.
@@ -17,21 +17,12 @@ package sarif.managers;
import java.io.IOException;
import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
import com.google.gson.JsonArray;
import ghidra.app.util.importer.MessageLog;
-import ghidra.program.model.address.Address;
-import ghidra.program.model.address.AddressRange;
-import ghidra.program.model.address.AddressRangeIterator;
-import ghidra.program.model.address.AddressSet;
-import ghidra.program.model.address.AddressSetView;
+import ghidra.program.model.address.*;
import ghidra.program.model.lang.Register;
import ghidra.program.model.listing.Program;
import ghidra.program.model.listing.ProgramContext;
@@ -56,6 +47,7 @@ public class RegisterValuesSarifMgr extends SarifMgr {
RegisterValuesSarifMgr(Program program, MessageLog log) {
super(KEY, program, log);
context = program.getProgramContext();
+ undefinedRegisterNames = new HashSet<>();
}
////////////////////////////