Update cpp/ql/lib/semmle/code/cpp/commons/StringConcatenation.qll

Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
This commit is contained in:
Ben Rodes
2024-01-05 08:19:11 -05:00
committed by GitHub
parent 2b325e99ce
commit 250ed48bf3

View File

@@ -47,7 +47,7 @@ class StringConcatenation extends Call {
// occurs in cases like `string s = s1 + s2 + s3`, which is represented as // occurs in cases like `string s = s1 + s2 + s3`, which is represented as
// `string s = (s1.operator+(s2)).operator+(s3);` // `string s = (s1.operator+(s2)).operator+(s3);`
// By limiting to non-calls we get the leaf operands (the variables or raw strings) // By limiting to non-calls we get the leaf operands (the variables or raw strings)
// also, by not enuemrating allowed types (variables and strings) we avoid issues // also, by not enumerating allowed types (variables and strings) we avoid issues
// with missed corner cases or extensions/changes to CodeQL in the future which might // with missed corner cases or extensions/changes to CodeQL in the future which might
// invalidate that approach. // invalidate that approach.
not result instanceof Call and not result instanceof Call and