mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Ruby: fix bug in filter_map summary
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -506,8 +506,19 @@ def m56
|
||||
a = [0, 1, 2, source(56)]
|
||||
b = a.filter_map do |x|
|
||||
sink(x) # $ hasValueFlow=56
|
||||
x
|
||||
end
|
||||
sink(b[0]) # $ hasValueFlow=56
|
||||
sink(b[3]) # $ hasValueFlow=56
|
||||
|
||||
c = a.filter_map do |x|
|
||||
"safe"
|
||||
end
|
||||
sink(c[0]) # safe
|
||||
|
||||
d = ["safe"].filter_map do |x|
|
||||
source(56.1)
|
||||
end
|
||||
sink(d[0]) # $ hasValueFlow=56.1
|
||||
end
|
||||
|
||||
def m57
|
||||
@@ -1629,4 +1640,4 @@ def m137
|
||||
sink(a[10001]) # $ hasValueFlow=137.1 $ hasValueFlow=137.2 $ hasValueFlow=137.3 $ hasValueFlow=137.4
|
||||
# unknown read
|
||||
sink(a[1.0]) # $ hasValueFlow=137.1 $ hasValueFlow=137.2 $ hasValueFlow=137.3 $ hasValueFlow=137.4
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user