packages feed

store 0.2.1.0 → 0.2.1.1

raw patch · 3 files changed

+11/−5 lines, 3 filesdep ~store-corenew-uploaderPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: store-core

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog +## 0.2.1.1++* Fixes a bug that could result in segfaults when reading corrupted data.+ ## 0.2.1.0  Release notes:
src/Data/Store/Internal.hs view
@@ -275,8 +275,9 @@ skip :: Int -> Peek () skip len = Peek $ \end ptr -> do     let ptr2 = ptr `plusPtr` len-    when (ptr2 > end) $-        tooManyBytes len (end `minusPtr` ptr) "skip"+        remaining = end `minusPtr` ptr+    when (len > remaining) $ -- Do not perform the check on the new pointer, since it could have overflowed+        tooManyBytes len remaining "skip"     return (ptr2, ())  -- | Isolate the input to n bytes, skipping n bytes forward. Fails if @m@@@ -285,8 +286,9 @@ isolate :: Int -> Peek a -> Peek a isolate len m = Peek $ \end ptr -> do     let ptr2 = ptr `plusPtr` len-    when (ptr2 > end) $-        tooManyBytes len (end `minusPtr` ptr) "isolate"+        remaining = end `minusPtr` ptr+    when (len > remaining) $ -- Do not perform the check on the new pointer, since it could have overflowed+        tooManyBytes len remaining "isolate"     (ptr', x) <- runPeek m end ptr     when (ptr' > end) $         throwIO $ PeekException (ptr' `minusPtr` end) "Overshot end of isolated bytes"
store.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:                store-version:             0.2.1.0+version:             0.2.1.1 synopsis:            Fast binary serialization homepage:            https://github.com/fpco/store#readme bug-reports:         https://github.com/fpco/store/issues