Skip to content

Commit 8b13d1f

Browse files
authored
Merge pull request github#9726 from github/rdmarsh2/stack-address-join-order
C++: fix join order in UsingExpiredStackAddress
2 parents 741b2a9 + 829fdd1 commit 8b13d1f

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)