File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,16 +340,16 @@ module NodeJSLib {
340340 /**
341341 * A model of taint propagation through `new Buffer` and `Buffer.from`.
342342 */
343- private class BufferTaintStep extends TaintTracking:: AdditionalTaintStep , DataFlow:: InvokeNode {
344- BufferTaintStep ( ) {
345- this = DataFlow:: globalVarRef ( "Buffer" ) .getAnInstantiation ( )
346- or
347- this = DataFlow:: globalVarRef ( "Buffer" ) .getAMemberInvocation ( "from" )
348- }
349-
343+ private class BufferTaintStep extends TaintTracking:: SharedTaintStep {
350344 override predicate step ( DataFlow:: Node pred , DataFlow:: Node succ ) {
351- pred = getArgument ( 0 ) and
352- succ = this
345+ exists ( DataFlow:: InvokeNode invoke |
346+ invoke = DataFlow:: globalVarRef ( "Buffer" ) .getAnInstantiation ( )
347+ or
348+ invoke = DataFlow:: globalVarRef ( "Buffer" ) .getAMemberInvocation ( "from" )
349+ |
350+ pred = invoke .getArgument ( 0 ) and
351+ succ = invoke
352+ )
353353 }
354354 }
355355
You can’t perform that action at this time.
0 commit comments