mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-28 12:15:55 +08:00
GP-1323 corrected NPE within LcsHintLoadSpecChooser
This commit is contained in:
+2
-1
@@ -58,8 +58,9 @@ public class LcsHintLoadSpecChooser implements LoadSpecChooser {
|
|||||||
// Try to use a known LoadSpec that matches the desired language/compiler spec
|
// Try to use a known LoadSpec that matches the desired language/compiler spec
|
||||||
Collection<LoadSpec> loadSpecs = loaderMap.get(loader);
|
Collection<LoadSpec> loadSpecs = loaderMap.get(loader);
|
||||||
for (LoadSpec loadSpec : loadSpecs) {
|
for (LoadSpec loadSpec : loadSpecs) {
|
||||||
|
// single loadSpec with null LCS pair may exist when no opinion was found
|
||||||
LanguageCompilerSpecPair lcsPair = loadSpec.getLanguageCompilerSpec();
|
LanguageCompilerSpecPair lcsPair = loadSpec.getLanguageCompilerSpec();
|
||||||
if (lcsPair.languageID.equals(languageID) &&
|
if (lcsPair != null && lcsPair.languageID.equals(languageID) &&
|
||||||
(compilerSpecID == null || lcsPair.compilerSpecID.equals(compilerSpecID))) {
|
(compilerSpecID == null || lcsPair.compilerSpecID.equals(compilerSpecID))) {
|
||||||
return loadSpec;
|
return loadSpec;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user