Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix comments
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
  • Loading branch information
Shimuuar and konsumlamm committed May 23, 2022
commit e61b1f9507be95146fa51adba90bf8d270fd9ecb
6 changes: 5 additions & 1 deletion vector/src/Data/Vector.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,11 @@ fromList :: [a] -> Vector a
{-# INLINE fromList #-}
fromList = G.fromList

-- | /O(n)/ Convert the first @n@ elements of a list to a vector.
-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
-- expected that the supplied list will be exactly @n@ elements long. As
-- an optimization, this function allocates a buffer for @n@ elements, which
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
-- that parameter.
--
-- @
-- fromListN n xs = 'fromList' ('take' n xs)
Expand Down
8 changes: 4 additions & 4 deletions vector/src/Data/Vector/Generic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2298,10 +2298,10 @@ fromList :: Vector v a => [a] -> v a
fromList = unstream . Bundle.fromList

-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
-- expected that supplied list will be exactly @n@ elements long. As
-- optimization this function allocates buffer for @n@ elements and
-- could be used to DoS by exhausting memory if attacker controls that
-- parameter.
-- expected that the supplied list will be exactly @n@ elements long. As
-- an optimization, this function allocates a buffer for @n@ elements, which
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
-- that parameter.
--
-- @
-- fromListN n xs = 'fromList' ('take' n xs)
Expand Down
8 changes: 4 additions & 4 deletions vector/src/Data/Vector/Primitive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1787,10 +1787,10 @@ fromList :: Prim a => [a] -> Vector a
fromList = G.fromList

-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
-- expected that supplied list will be exactly @n@ elements long. As
-- optimization this function allocates buffer for @n@ elements and
-- could be used to DoS by exhausting memory if attacker controls that
-- parameter.
-- expected that the supplied list will be exactly @n@ elements long. As
-- an optimization, this function allocates a buffer for @n@ elements, which
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
-- that parameter.
--
-- @
-- fromListN n xs = 'fromList' ('take' n xs)
Expand Down
8 changes: 4 additions & 4 deletions vector/src/Data/Vector/Storable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1833,10 +1833,10 @@ fromList :: Storable a => [a] -> Vector a
fromList = G.fromList

-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
-- expected that supplied list will be exactly @n@ elements long. As
-- optimization this function allocates buffer for @n@ elements and
-- could be used to DoS by exhausting memory if attacker controls that
-- parameter.
-- expected that the supplied list will be exactly @n@ elements long. As
-- an optimization, this function allocates a buffer for @n@ elements, which
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
-- that parameter.
--
-- @
-- fromListN n xs = 'fromList' ('take' n xs)
Expand Down
8 changes: 4 additions & 4 deletions vector/src/Data/Vector/Unboxed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1879,10 +1879,10 @@ fromList :: Unbox a => [a] -> Vector a
fromList = G.fromList

-- | /O(n)/ Convert the first @n@ elements of a list to a vector. It's
-- expected that supplied list will be exactly @n@ elements long. As
-- optimization this function allocates buffer for @n@ elements and
-- could be used to DoS by exhausting memory if attacker controls that
-- parameter.
-- expected that the supplied list will be exactly @n@ elements long. As
-- an optimization, this function allocates a buffer for @n@ elements, which
-- could be used for DoS-attacks by exhausting the memory if an attacker controls
-- that parameter.
--
-- @
-- fromListN n xs = 'fromList' ('take' n xs)
Expand Down