Skip to content

Commit a8b8b54

Browse files
geoffw0MathiasVP
andauthored
Update cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql
Co-authored-by: Mathias Vorreiter Pedersen <[email protected]>
1 parent 4b8575b commit a8b8b54

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,18 @@ import DataFlow::PathGraph
2121
/**
2222
* A buffer write into a sensitive expression.
2323
*/
24-
class SensitiveBufferWrite extends Expr {
25-
BufferWrite::BufferWrite write;
26-
27-
SensitiveBufferWrite() {
28-
this = write and
29-
write.getDest() instanceof SensitiveExpr
30-
}
24+
class SensitiveBufferWrite extends Expr instanceof BufferWrite::BufferWrite {
25+
SensitiveBufferWrite() { super.getDest() instanceof SensitiveExpr }
3126

3227
/**
3328
* Gets a data source of this operation.
3429
*/
35-
Expr getASource() { result = write.getASource() }
30+
Expr getASource() { result = super.getASource() }
3631

3732
/**
3833
* Gets the destination buffer of this operation.
3934
*/
40-
Expr getDest() { result = write.getDest() }
35+
Expr getDest() { result = super.getDest() }
4136
}
4237

4338
/**

0 commit comments

Comments
 (0)