File tree Expand file tree Collapse file tree 5 files changed +21
-17
lines changed Expand file tree Collapse file tree 5 files changed +21
-17
lines changed Original file line number Diff line number Diff line change @@ -2119,7 +2119,11 @@ fromList :: [a] -> Vector a
2119
2119
{-# INLINE fromList #-}
2120
2120
fromList = G. fromList
2121
2121
2122
- -- | /O(n)/ Convert the first @n@ elements of a list to a vector.
2122
+ -- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
2123
+ -- expected that the supplied list will be exactly @n@ elements long. As
2124
+ -- an optimization, this function allocates a buffer for @n@ elements, which
2125
+ -- could be used for DoS-attacks by exhausting the memory if an attacker controls
2126
+ -- that parameter.
2123
2127
--
2124
2128
-- @
2125
2129
-- fromListN n xs = 'fromList' ('take' n xs)
Original file line number Diff line number Diff line change @@ -2298,10 +2298,10 @@ fromList :: Vector v a => [a] -> v a
2298
2298
fromList = unstream . Bundle. fromList
2299
2299
2300
2300
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
2301
- -- expected that supplied list will be exactly @n@ elements long. As
2302
- -- optimization this function allocates buffer for @n@ elements and
2303
- -- could be used to DoS by exhausting memory if attacker controls that
2304
- -- parameter.
2301
+ -- expected that the supplied list will be exactly @n@ elements long. As
2302
+ -- an optimization, this function allocates a buffer for @n@ elements, which
2303
+ -- could be used for DoS-attacks by exhausting the memory if an attacker controls
2304
+ -- that parameter.
2305
2305
--
2306
2306
-- @
2307
2307
-- fromListN n xs = 'fromList' ('take' n xs)
Original file line number Diff line number Diff line change @@ -1787,10 +1787,10 @@ fromList :: Prim a => [a] -> Vector a
1787
1787
fromList = G. fromList
1788
1788
1789
1789
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
1790
- -- expected that supplied list will be exactly @n@ elements long. As
1791
- -- optimization this function allocates buffer for @n@ elements and
1792
- -- could be used to DoS by exhausting memory if attacker controls that
1793
- -- parameter.
1790
+ -- expected that the supplied list will be exactly @n@ elements long. As
1791
+ -- an optimization, this function allocates a buffer for @n@ elements, which
1792
+ -- could be used for DoS-attacks by exhausting the memory if an attacker controls
1793
+ -- that parameter.
1794
1794
--
1795
1795
-- @
1796
1796
-- fromListN n xs = 'fromList' ('take' n xs)
Original file line number Diff line number Diff line change @@ -1833,10 +1833,10 @@ fromList :: Storable a => [a] -> Vector a
1833
1833
fromList = G. fromList
1834
1834
1835
1835
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
1836
- -- expected that supplied list will be exactly @n@ elements long. As
1837
- -- optimization this function allocates buffer for @n@ elements and
1838
- -- could be used to DoS by exhausting memory if attacker controls that
1839
- -- parameter.
1836
+ -- expected that the supplied list will be exactly @n@ elements long. As
1837
+ -- an optimization, this function allocates a buffer for @n@ elements, which
1838
+ -- could be used for DoS-attacks by exhausting the memory if an attacker controls
1839
+ -- that parameter.
1840
1840
--
1841
1841
-- @
1842
1842
-- fromListN n xs = 'fromList' ('take' n xs)
Original file line number Diff line number Diff line change @@ -1879,10 +1879,10 @@ fromList :: Unbox a => [a] -> Vector a
1879
1879
fromList = G. fromList
1880
1880
1881
1881
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
1882
- -- expected that supplied list will be exactly @n@ elements long. As
1883
- -- optimization this function allocates buffer for @n@ elements and
1884
- -- could be used to DoS by exhausting memory if attacker controls that
1885
- -- parameter.
1882
+ -- expected that the supplied list will be exactly @n@ elements long. As
1883
+ -- an optimization, this function allocates a buffer for @n@ elements, which
1884
+ -- could be used for DoS-attacks by exhausting the memory if an attacker controls
1885
+ -- that parameter.
1886
1886
--
1887
1887
-- @
1888
1888
-- fromListN n xs = 'fromList' ('take' n xs)
You can’t perform that action at this time.
0 commit comments