mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 20:33:11 +08:00
GP-3643 fixed sizes of varnodes in variable space
This commit is contained in:
+3
-2
@@ -19,8 +19,7 @@ import static ghidra.program.model.pcode.AttributeId.*;
|
|||||||
import static ghidra.program.model.pcode.ElementId.*;
|
import static ghidra.program.model.pcode.ElementId.*;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
import ghidra.program.model.address.*;
|
import ghidra.program.model.address.*;
|
||||||
import ghidra.program.model.lang.Language;
|
import ghidra.program.model.lang.Language;
|
||||||
@@ -389,6 +388,8 @@ public class Varnode {
|
|||||||
VariableStorage storage = factory.getJoinStorage(pieces);
|
VariableStorage storage = factory.getJoinStorage(pieces);
|
||||||
// Update "join" address to the one just registered with the pieces
|
// Update "join" address to the one just registered with the pieces
|
||||||
addr = factory.getJoinAddress(storage);
|
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) {
|
catch (InvalidInputException e) {
|
||||||
throw new DecoderException("Invalid varnode pieces: " + e.getMessage());
|
throw new DecoderException("Invalid varnode pieces: " + e.getMessage());
|
||||||
|
|||||||
Reference in New Issue
Block a user