Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit cfba089

Browse files
committed
Improve code style
No behavioural changes
1 parent fb85ccb commit cfba089

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ql/src/semmle/go/frameworks/Protobuf.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ module Protobuf {
6464
*/
6565
private class MarshalStateStep extends TaintTracking::AdditionalTaintStep {
6666
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
67-
exists(DataFlow::Node marshalInput, DataFlow::CallNode marshalStateCall |
67+
exists(DataFlow::PostUpdateNode marshalInput, DataFlow::CallNode marshalStateCall |
6868
marshalStateCall = marshalStateMethod().getACall() and
6969
// pred -> marshalInput.Message
7070
any(DataFlow::Write w)
71-
.writesField(marshalInput.(DataFlow::PostUpdateNode).getPreUpdateNode(),
72-
inputMessageField(), pred) and
71+
.writesField(marshalInput.getPreUpdateNode(), inputMessageField(), pred) and
7372
// marshalInput -> marshalStateCall
7473
marshalStateCall.getArgument(0) = globalValueNumber(marshalInput).getANode() and
7574
// marshalStateCall -> succ
@@ -154,7 +153,7 @@ module Protobuf {
154153
*
155154
* For example, in the expression a.b[c].d[e], this would return the dataflow node for the read from `a`.
156155
*/
157-
DataFlow::Node getUnderlyingNode(DataFlow::ReadNode read) {
156+
private DataFlow::Node getUnderlyingNode(DataFlow::ReadNode read) {
158157
(result = read or result = getBaseLookingThroughDerefs+(read)) and
159158
not result instanceof DataFlow::ComponentReadNode
160159
}

0 commit comments

Comments
 (0)