summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-11-25 22:00:02 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-11-25 22:00:02 (GMT)
commit671cacb80fd438a5f4d51db853ed08d7a6edb9ab (patch)
tree3081bc41bca43137cca75e52fcbcf81798e8b4e2 /plugins
parent40d448bc4734882ca4a2580b481738f4720ebabe (diff)
Fortified Chrysalide a little bit against wrong APK files.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@291 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins')
-rw-r--r--plugins/androhelpers/try_n_catch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/androhelpers/try_n_catch.c b/plugins/androhelpers/try_n_catch.c
index 288fa1e..27c7959 100644
--- a/plugins/androhelpers/try_n_catch.c
+++ b/plugins/androhelpers/try_n_catch.c
@@ -127,6 +127,9 @@ static void attach_caught_code(const GLoadedBinary *binary, const GBinRoutine *r
first = g_arch_instruction_find_by_address(instrs, start, true);
next = g_arch_instruction_find_by_address(instrs, end, true);
+ if (start == NULL || next == NULL)
+ return;
+
/* Si des détachements sont nécessaires... */
if (!g_arch_instruction_has_sources(first))
@@ -272,7 +275,11 @@ static caught_exception **build_all_destinations_list(const GLoadedBinary *binar
continue;
type = get_type_from_dex_pool(format, handlers->handlers[j].type_idx);
+ if (type == NULL)
+ continue;
+
excep->desc = g_data_type_to_string(type);
+ g_object_unref(G_OBJECT(type));
(*count)[i]++;