Skip to content

Commit 829fdd1

Browse files
committed
C++: fix join order in UsingExpiredStackAddress
1 parent dfe276a commit 829fdd1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpp/ql/src/Likely Bugs/Memory Management/UsingExpiredStackAddress.ql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ TGlobalAddress globalAddress(Instruction instr) {
133133
)
134134
or
135135
exists(FieldAddressInstruction fai | instr = fai |
136-
result = TFieldAddress(globalAddress(fai.getObjectAddress()), fai.getField())
136+
result =
137+
TFieldAddress(globalAddress(pragma[only_bind_into](fai.getObjectAddress())),
138+
pragma[only_bind_out](fai.getField()))
137139
)
138140
or
139141
result = globalAddress(instr.(PointerOffsetInstruction).getLeft())

0 commit comments

Comments
 (0)