From: Jay Freeman (saurik) Date: Wed, 4 Jun 2014 10:14:53 +0000 (-0700) Subject: In trampoline, make $strlcpy not crash given NULL. X-Git-Tag: v0.9.502~19 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/f6fa3c2112ee8b0aa26ab0765674601a9800db77?ds=sidebyside In trampoline, make $strlcpy not crash given NULL. --- diff --git a/Trampoline.t.cpp b/Trampoline.t.cpp index 7c6b388..b3bf31d 100644 --- a/Trampoline.t.cpp +++ b/Trampoline.t.cpp @@ -53,6 +53,8 @@ static int $strcmp(const char *lhs, const char *rhs) { } static void $strlcpy(char *dst, const char *src, size_t size) { + if (src == NULL) + src = "(null)"; if (size == 0) return; size_t i(0);