Skip to content

Commit c36ad7d

Browse files
yofftausbn
andauthored
Apply suggestions from code review
Co-authored-by: Taus <tausbn@github.com>
1 parent 6a3aed3 commit c36ad7d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

python/ql/src/experimental/semmle/python/Concepts.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module SystemCommandExecution {
4646
* decompressing, decrypting, parsing etc.
4747
*
4848
* Doing so should normally preserve taint, but it can also be a problem
49-
* in itself, e.g. if it allows code execution or could result in deinal-of-service.
49+
* in itself, e.g. if it allows code execution or could result in denial-of-service.
5050
*
5151
* Extend this class to refine existing API models. If you want to model new APIs,
5252
* extend `Decoding::Range` instead.
@@ -77,7 +77,7 @@ module Decoding {
7777
* decompressing, decrypting, parsing etc.
7878
*
7979
* Doing so should normally preserve taint, but it can also be a problem
80-
* in itself, e.g. if it allows code execution or could result in deinal-of-service.
80+
* in itself, e.g. if it allows code execution or could result in denial-of-service.
8181
*
8282
* Extend this class to model new APIs. If you want to refine existing API models,
8383
* extend `Decoding` instead.

python/ql/src/experimental/semmle/python/frameworks/Dill.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ private module Dill {
4343
* See https://pypi.org/project/dill/ (which currently refers you
4444
* to https://docs.python.org/3/library/pickle.html#pickle.loads)
4545
*/
46-
private class DillLoadsCall extends Decoding::Range {
47-
DillLoadsCall() { this.asCfgNode().(CallNode).getFunction() = Dill::dill::loads().asCfgNode() }
46+
private class DillLoadsCall extends Decoding::Range, DataFlow::CfgNode {
47+
override CallNode node;
48+
DillLoadsCall() { node.getFunction() = Dill::dill::loads().asCfgNode() }
4849

4950
override predicate unsafe() { any() }
5051

5152
override DataFlow::Node getAnInput() {
52-
result.asCfgNode() = this.asCfgNode().(CallNode).getArg(0)
53+
result.asCfgNode() = node.getArg(0)
5354
}
5455

5556
override DataFlow::Node getOutput() { result = this }

0 commit comments

Comments
 (0)