Skip to content

[Bug] java.lang.ArrayIndexOutOfBoundsException at decode #5

@bigConifer

Description

@bigConifer

For some AndroidManifest.xml files decoding fails and java.lang.ArrayIndexOutOfBoundsException is thrown.

java.lang.ArrayIndexOutOfBoundsException: 2325
        at android.content.res.StringBlock.getShort(StringBlock.java:231)
        at android.content.res.StringBlock.getString(StringBlock.java:91)
        at android.content.res.AXmlResourceParser.getNamespaceUri(AXmlResourceParser.java:186)
        at com.bigzhao.xml2axml.test.AXMLPrinter.decode(AXMLPrinter.java:84)
        at com.bigzhao.xml2axml.test.AXMLPrinter.main(AXMLPrinter.java:47)
        at com.bigzhao.xml2axml.test.Main.decode(Main.java:37)
        at com.bigzhao.xml2axml.test.Main.main(Main.java:21)

To reproduce try to decode the following binary AndroidManifest.xml files extracted from old mozilla fennec nightly build APKs.

java -jar xml2axml d AndroidManifest---2018-07-25--10-30-32.xml.txt AndroidManifest-readable.xml

AndroidManifest---2018-07-25--10-30-32.xml.txt
AndroidManifest---2018-07-26--10-03-40.xml.txt

The the first Manifest fails but the second one works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions