diff --git a/saltine.cabal b/saltine.cabal
--- a/saltine.cabal
+++ b/saltine.cabal
@@ -1,5 +1,5 @@
 name:                saltine
-version:             0.0.0.5
+version:             0.0.0.6
 synopsis:            Cryptography that's easy to digest (NaCl/libsodium bindings).
 description:
 
diff --git a/src/Crypto/Saltine/Internal/Util.hs b/src/Crypto/Saltine/Internal/Util.hs
--- a/src/Crypto/Saltine/Internal/Util.hs
+++ b/src/Crypto/Saltine/Internal/Util.hs
@@ -1,6 +1,7 @@
 module Crypto.Saltine.Internal.Util where
 
 import           Foreign.C
+import           Foreign.Marshal.Alloc    (mallocBytes)
 import           Foreign.Ptr
 import           System.IO.Unsafe
 
@@ -67,8 +68,9 @@
 -- 'IO' monad.
 buildUnsafeCVector' :: Int -> (Ptr CChar -> IO b) -> IO (b, ByteString)
 buildUnsafeCVector' n k = do
-  let bs = S.replicate n 0
-  out   <- unsafeUseAsCString bs k
+  ph  <- mallocBytes n
+  bs  <- unsafePackMallocCStringLen (ph, fromIntegral n)
+  out <- unsafeUseAsCString bs k
   return (out, bs)
 
 -- | Extremely unsafe function, use with utmost care! Builds a new
