diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,11 @@
 See also http://pvp.haskell.org/faq
 
+## 0.95.1.3.8.43
+- Version bump to reflect pcre version (8.43) and to have Hackage upgrade from 0.95.1.2.8.43 which does not include #15
+
+## 0.95.1.1.8.44
+- Fix: `asCString` for `Text` regexes doesn't check for null-termination, causing the compiled regex to be corrupted. (@kuribas)
+
 ## 0.95.1.0.8.43
 
 - Update to `regex-0.94.0.0` API
diff --git a/regex-pcre-builtin.cabal b/regex-pcre-builtin.cabal
--- a/regex-pcre-builtin.cabal
+++ b/regex-pcre-builtin.cabal
@@ -1,5 +1,5 @@
 Name:                   regex-pcre-builtin
-Version:                0.95.1.2.8.43
+Version:                0.95.1.3.8.43
 Cabal-Version:          >=1.10
 stability:              Seems to work, passes a few tests
 build-type:             Simple
diff --git a/src/Text/Regex/PCRE/Text.hs b/src/Text/Regex/PCRE/Text.hs
--- a/src/Text/Regex/PCRE/Text.hs
+++ b/src/Text/Regex/PCRE/Text.hs
@@ -50,6 +50,9 @@
   ) where
 
 import           Data.Array(Array,listArray)
+import           Data.Char(ord)
+import           Control.Monad.Fail (fail)
+import           Prelude hiding (fail)
 import qualified Data.ByteString              as B
 import qualified Data.ByteString.Unsafe       as B
 import qualified Data.Text                    as T
@@ -154,7 +157,9 @@
 
 {-# INLINE asCString #-}
 asCString :: T.Text -> (CString->IO a) -> IO a
-asCString = B.unsafeUseAsCString . T.encodeUtf8
+asCString t
+  | T.null t || (ord (T.last t) /= 0) = B.useAsCString $ T.encodeUtf8 t
+  | otherwise = B.unsafeUseAsCString $ T.encodeUtf8 t
 
 {-# INLINE asCStringLen #-}
 asCStringLen :: T.Text -> (CStringLen->IO a) -> IO a
