]> git.saurik.com Git - cycript.git/commitdiff
apr_pstrdup used to return NULL when passed NULL.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 23 Jun 2013 08:45:22 +0000 (01:45 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 23 Jun 2013 08:45:22 +0000 (01:45 -0700)
Pooling.hpp

index bd37c5c2d77f8d8be13ebcaf750bd0f65eaa4ee1..24c7cc25af044776623638f1dd9efc36650c1c84 100644 (file)
@@ -99,6 +99,8 @@ class CYPool {
     }
 
     char *strdup(const char *data) {
+        if (data == NULL)
+            return NULL;
         return reinterpret_cast<char *>(memdup(data, strlen(data) + 1));
     }