diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-06-14 23:39:03 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-06-14 23:39:03 (GMT) |
commit | 1e2aada1204d3da43fe075478df5bfaaece937b0 (patch) | |
tree | 99eb321808ddcc0364928adf9266f32a201d2b59 /src/format/dex/method.c | |
parent | af7d2ea327d27200ad151d3e1ba0ee6d51b1ff62 (diff) |
Made the program stronger by handling more errors.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@167 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/dex/method.c')
-rw-r--r-- | src/format/dex/method.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/format/dex/method.c b/src/format/dex/method.c index 4888c89..ce4d8dd 100644 --- a/src/format/dex/method.c +++ b/src/format/dex/method.c @@ -135,6 +135,12 @@ GDexMethod *g_dex_method_new(const GDexFormat *format, const encoded_method *see if (!read_dex_code_item(format, &offset, &item)) return NULL; + *last += seed->method_idx_diff; + routine = get_routine_from_dex_pool(format, *last); + + if (routine == NULL) return NULL; + + result = g_object_new(G_TYPE_DEX_METHOD, NULL); result->body = item; @@ -143,9 +149,6 @@ GDexMethod *g_dex_method_new(const GDexFormat *format, const encoded_method *see //printf(" code size :: %d\n", item.insns_size); - *last += seed->method_idx_diff; - routine = get_routine_from_dex_pool(format, *last); - printf(" method idx :: %lld\n", *last); |