From: Jay Freeman (saurik) Date: Tue, 5 Jan 2016 09:07:44 +0000 (-0800) Subject: Do not allow JavaMethod calls on non-Java objects. X-Git-Tag: v0.9.590~53 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/447b698cea96010d0850e056348ef6cd085b96d9?ds=sidebyside Do not allow JavaMethod calls on non-Java objects. --- diff --git a/Java/Execute.cpp b/Java/Execute.cpp index f382bc9..4ea8a51 100644 --- a/Java/Execute.cpp +++ b/Java/Execute.cpp @@ -942,6 +942,7 @@ static bool CYCastJavaArguments(const CYJavaFrame &frame, const CYJavaShorty &sh static JSValueRef JavaMethod_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) { CYTry { auto internal(CYJavaMethod::Get(context, object)); CYJavaObject *self(CYGetJavaObject(context, _this)); + _assert(self != NULL); CYJavaEnv jni(self->value_); CYJavaSignature bound(count);