[add md5lazyIO, check for bad paths in createTempFile
John Meacham <john@repetae.net>**20120209091527
 Ignore-this: f9e5f0dafc9615d5c5c50cb49829c5a5
] hunk ./src/Support/MD5.hs 2
-module Support.MD5(Hash(),emptyHash,md5,md5file,md5lazy,md5show32,md5Bytes,md5String,md5Handle,hashToBytes) where
+module Support.MD5(
+    Hash(), emptyHash, md5,md5file,md5lazy,md5lazyIO,
+    md5show32,md5Bytes,md5String,md5Handle,hashToBytes) where
hunk ./src/Support/MD5.hs 25
-md5lazy lbs = unsafePerformIO $ do
+md5lazy lbs = unsafePerformIO $ md5lazyIO lbs
+
+md5lazyIO :: LBS.ByteString -> IO Hash
+md5lazyIO lbs = do
hunk ./src/Support/TempDir.hs 1
-{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE ForeignFunctionInterface,ViewPatterns,RecordWildCards #-}
hunk ./src/Support/TempDir.hs 72
-createTempFile fp = do
+createTempFile (FP.normalise -> fp) = do
+    unless (filePathSafe fp) $
+        fail $ "createTempFile: unsafe path " ++ fp