@@ -49,28 +49,22 @@ module Protobuf {
4949 }
5050
5151 /**
52- * Additional taint-flow step modelling flow from MarshalInput.Message to MarshalOutput,
53- * mediated by a MarshalOptions.MarshalState call.
52+ * Additional taint-flow step modelling flow from ` MarshalInput.Message` to ` MarshalOutput` ,
53+ * mediated by a ` MarshalOptions.MarshalState` call.
5454 *
55- * Note we can taint the whole MarshalOutput as it only has one field (Buf), and taint-
55+ * Note we can taint the whole ` MarshalOutput` as it only has one field (` Buf` ), and taint-
5656 * tracking always considers a field of a tainted struct to itself be tainted.
5757 */
5858 private class MarshalStateStep extends TaintTracking:: AdditionalTaintStep {
5959 override predicate step ( DataFlow:: Node pred , DataFlow:: Node succ ) {
60- exists (
61- DataFlow:: Node marshalInput , DataFlow:: Node passedMarshalInput ,
62- DataFlow:: CallNode marshalStateCall
63- |
60+ exists ( DataFlow:: Node marshalInput , DataFlow:: CallNode marshalStateCall |
6461 marshalStateCall = marshalStateMethod ( ) .getACall ( ) and
6562 // pred -> marshalInput.Message
6663 any ( DataFlow:: Write w )
6764 .writesField ( marshalInput .( DataFlow:: PostUpdateNode ) .getPreUpdateNode ( ) ,
6865 inputMessageField ( ) , pred ) and
69- // marshalInput -> passedMarshalInput
70- passedMarshalInput .asExpr ( ) .getGlobalValueNumber ( ) =
71- marshalInput .asExpr ( ) .getGlobalValueNumber ( ) and
72- // passedMarshalInput -> marshalStateCall
73- marshalStateCall .getArgument ( 0 ) = passedMarshalInput and
66+ // marshalInput -> marshalStateCall
67+ marshalStateCall .getArgument ( 0 ) = globalValueNumber ( marshalInput ) .getANode ( ) and
7468 // marshalStateCall -> succ
7569 marshalStateCall .getResult ( ) = succ
7670 )
0 commit comments