mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
gp-4641 - MDMang fix infinite loop
This commit is contained in:
parent
b5e6782db6
commit
2efe1b9e62
1 changed files with 9 additions and 2 deletions
|
@ -97,9 +97,16 @@ public class MDQualification extends MDParsableItem implements Iterable<MDQualif
|
|||
@Override
|
||||
protected void parseInternal() throws MDException {
|
||||
while ((dmang.peek() != MDMang.DONE) && (dmang.peek() != '@')) {
|
||||
int loc = dmang.getIndex();
|
||||
MDQualifier qual = new MDQualifier(dmang);
|
||||
qual.parse();
|
||||
quals.add(qual);
|
||||
// This is a quick fix to prevent infinite looping when the next character is not
|
||||
// expected. TODO: need to work on code the breaks symbols on these other
|
||||
// characters that we have seen such as '.' and '`'.
|
||||
if (dmang.getIndex() == loc) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (dmang.peek() == '@') {
|
||||
dmang.increment(); // Skip past @.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue