From fadcc2dcb90d9ce6374351d75111dc475d6f9826 Mon Sep 17 00:00:00 2001 From: "jesusfreke@jesusfreke.com" Date: Fri, 15 Jul 2011 09:22:43 +0000 Subject: [PATCH] Ignore the link section in the header git-svn-id: https://smali.googlecode.com/svn/trunk@812 55b6fa8a-2a1e-11de-a435-ffa8d773f76a --- dexlib/src/main/java/org/jf/dexlib/HeaderItem.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dexlib/src/main/java/org/jf/dexlib/HeaderItem.java b/dexlib/src/main/java/org/jf/dexlib/HeaderItem.java index f4435268..5daf00c9 100644 --- a/dexlib/src/main/java/org/jf/dexlib/HeaderItem.java +++ b/dexlib/src/main/java/org/jf/dexlib/HeaderItem.java @@ -79,14 +79,9 @@ public class HeaderItem extends Item { throw new RuntimeException("The endian tag is not 0x12345678 or 0x78563412"); } - //link_size - if (in.readInt() != 0) { - throw new RuntimeException("This dex file has a link section, which is not supported"); - } - - //link_off - if (in.readInt() != 0) { - throw new RuntimeException("This dex file has a link section, which is not supported"); + //link_size + link_off + if ((in.readInt() | in.readInt()) != 0) { + System.err.println("This dex file has a link section, which is not supported. Ignoring."); } int sectionSize;