Data.ByteString.Lazy.Char8's readInt does no bounds checking
|Reported by:||bos||Owned by:|
|Type of failure:||Difficulty:||Easy (less than 1 hour)|
|Test Case:||Blocked By:|
Description (last modified by igloo)
I think it should be failing with Nothing if given a string of digits that's too long.
~ $ ghci ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help. Loading package base ... linking ... done. Prelude> :m +Data.ByteString.Lazy.Char8 Prelude Data.ByteString.Lazy.Char8> readInt (pack "99999999999999999999") Just (7766279631452241919,LPS )
Change History (6)
comment:3 Changed 7 years ago by igloo
- Description modified (diff)
- Resolution set to invalid
- Status changed from new to closed
comment:5 Changed 6 years ago by simonmar
- Operating System changed from Multiple to Unknown/Multiple
Note: See TracTickets for help on using tickets.