Skip to content

Commit 8647f69

Browse files
committed
Change string prefix check
This avoids putting all the prefixes in the string pool.
1 parent 0793c58 commit 8647f69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/ql/lib/semmle/go/dataflow/ExternalFlow.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private string groupPrefix() { result = "group:" }
102102
*/
103103
bindingset[packageOrGroup]
104104
private string getPackage(string packageOrGroup) {
105-
not packageOrGroup.prefix(groupPrefix().length()) = groupPrefix() and result = packageOrGroup
105+
not exists(string group | packageOrGroup = groupPrefix() + group) and result = packageOrGroup
106106
or
107107
exists(string group |
108108
FlowExtensions::packageGrouping(group, result) and

0 commit comments

Comments
 (0)