Ruby: fix bug in filter_map summary

This commit is contained in:
Asger F
2023-06-09 14:31:10 +02:00
parent f222cce2e5
commit a50d91ea48
3 changed files with 6100 additions and 6066 deletions

View File

@@ -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