Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37dac18

Browse files
committed
Ruby: String.try_convert isn't value-preserving
`String.try_convert` can convert arbitrary objects to strings, which obviously isn't value-preserving.
1 parent fc351fb commit 37dac18

3 files changed

Lines changed: 591 additions & 590 deletions

File tree

ruby/ql/lib/codeql/ruby/frameworks/core/String.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module String {
4747
override predicate propagatesFlowExt(string input, string output, boolean preservesValue) {
4848
input = "Argument[0]" and
4949
output = "ReturnValue" and
50-
preservesValue = true
50+
preservesValue = false
5151
}
5252
}
5353

0 commit comments

Comments
 (0)