Skip to content

Bug: crash when trying to parse VectorDrawable binary XML file #9

Description

@AndroidDeveloperLB

I try to parse some XML files, and check if an XML file is indeed a VectorDrawable one:

            try {
                val doc = CompressedXmlParser().parseDOM(ByteArrayInputStream(data))
                Log.d("AppLog", "got docs")
            } catch (e: Exception) {
                e.printStackTrace()
                Log.d("AppLog", "")
            }

For some reason, when I try it, I get java.lang.NegativeArraySizeException: -126 .

How come?

Attached the file.

ic_launcher_foreground.zip

Also attached POC project that I used for this:

apkInfoUsingSaf.zip

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