Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions go/ql/lib/semmle/go/StringOps.qll
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,12 @@ module StringOps {
*/
class StringFormatCall extends DataFlow::CallNode {
string fmt;
Range f;

StringFormatCall() {
this = f.getACall() and
fmt = this.getArgument(f.getFormatStringIndex()).getStringValue() and
exists(Range f |
this = f.getACall() and
fmt = this.getArgument(f.getFormatStringIndex()).getStringValue()
) and
fmt.regexpMatch(getFormatComponentRegex() + "*")
}

Expand Down
4 changes: 2 additions & 2 deletions go/ql/lib/semmle/go/dataflow/internal/DataFlowUtil.qll
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ module BarrierGuard<guardChecksSig/3 guardChecks> {
}

/**
* Holds if `guard` marks a point in the control-flow graph where this node
* Holds if `guard` marks a point in the control-flow graph where `g`
* is known to validate `nd`, which is represented by `ap`.
*
* This predicate exists to enforce a good join order in `getAGuardedNode`.
Expand All @@ -378,7 +378,7 @@ module BarrierGuard<guardChecksSig/3 guardChecks> {
}

/**
* Holds if `guard` marks a point in the control-flow graph where this node
* Holds if `guard` marks a point in the control-flow graph where `g`
* is known to validate `nd`.
*/
private predicate guards(Node g, ControlFlow::ConditionGuardNode guard, Node nd) {
Expand Down
Loading