mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-3643 fixed sizes of varnodes in variable space
This commit is contained in:
parent
76af93af47
commit
76feae3d49
1 changed files with 3 additions and 2 deletions
|
@ -19,8 +19,7 @@ import static ghidra.program.model.pcode.AttributeId.*;
|
|||
import static ghidra.program.model.pcode.ElementId.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.*;
|
||||
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.lang.Language;
|
||||
|
@ -389,6 +388,8 @@ public class Varnode {
|
|||
VariableStorage storage = factory.getJoinStorage(pieces);
|
||||
// Update "join" address to the one just registered with the pieces
|
||||
addr = factory.getJoinAddress(storage);
|
||||
// Update size to be the size of the pieces
|
||||
sz = Arrays.stream(pieces).map(x -> x.getSize()).reduce(0, Integer::sum);
|
||||
}
|
||||
catch (InvalidInputException e) {
|
||||
throw new DecoderException("Invalid varnode pieces: " + e.getMessage());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue