Fix potential IndexOutOfBoundsException in PDB parsing

This commit is contained in:
Christian Nieves 2024-12-04 19:30:55 -06:00 committed by GitHub
parent 954ff4e124
commit 2428fcc3e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -135,6 +135,9 @@ public class SymbolRecords {
if (debugInfo == null) {
return;
}
if (debugInfo.getModuleInformationList().size() == 0) {
return;
}
// We are assuming that first in the list is the one to look at for cases 1 and 2.
// If something else like lowest stream number, then need to change the logic.
ModuleInformation moduleInfo = debugInfo.getModuleInformationList().get(0);