From cc4bbc46ea072e58c00c3152a0809478705494cf Mon Sep 17 00:00:00 2001 From: "JesusFreke@JesusFreke.com" Date: Fri, 11 Sep 2009 01:44:57 +0000 Subject: [PATCH] Fixed a crash when trying to look up the superclass for Object git-svn-id: https://smali.googlecode.com/svn/trunk@459 55b6fa8a-2a1e-11de-a435-ffa8d773f76a --- deodexerant/Main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/deodexerant/Main.c b/deodexerant/Main.c index 8d8cc546..a3956318 100644 --- a/deodexerant/Main.c +++ b/deodexerant/Main.c @@ -387,7 +387,7 @@ ClassObject *lookupSuperclass(char *classType) if (clazz == NULL) return NULL; - + return clazz->super; } @@ -531,7 +531,7 @@ int main(int argc, char* const argv[]) memcpy(buf, command, len); buf[len] = 0; - //printf("%s\n", buf); + printf("%s\n", buf); char *cmd = strtok(buf, " "); if (cmd == NULL) { @@ -607,6 +607,13 @@ int main(int argc, char* const argv[]) } ClassObject *clazz = lookupSuperclass(classType); + if (clazz == NULL) + { + fprintf(clientOut, "class: \n"); + fflush(clientOut); + break; + } + fprintf(clientOut, "class: %s\n", clazz->descriptor); fflush(clientOut); break;