diff --git a/Git/Libgit2.hs b/Git/Libgit2.hs
--- a/Git/Libgit2.hs
+++ b/Git/Libgit2.hs
@@ -248,7 +248,7 @@
     -- The lifetime of buf is tied to the lifetime of the blob object in
     -- libgit2, which this Blob object controls, so we can use
     -- unsafePackCStringLen to refer to its bytes.
-    bstr <- curry BU.unsafePackCStringLen (castPtr buf) (fromIntegral size)
+    bstr <- curry B.packCStringLen (castPtr buf) (fromIntegral size)
     return $ Git.Blob oid (Git.BlobString bstr)
 
 lgLookupBlob :: Git.MonadGit m => BlobOid m
diff --git a/gitlib-libgit2.cabal b/gitlib-libgit2.cabal
--- a/gitlib-libgit2.cabal
+++ b/gitlib-libgit2.cabal
@@ -1,5 +1,5 @@
 Name:                gitlib-libgit2
-Version:             1.4.0
+Version:             1.4.1
 Synopsis:            Libgit2 backend for gitlib
 License-file:        LICENSE
 License:             MIT
@@ -25,7 +25,7 @@
           base >=3
         , gitlib             >= 1.4.0
         , gitlib-test        >= 1.4.0
-        , gitlib-libgit2     >= 1.4.0
+        , gitlib-libgit2     >= 1.4.1
         , HUnit              >= 1.2.5
         , hspec              >= 1.4.4
         , hspec-expectations >= 0.3
