Skip to content

Crash when reading Adobe-obfuscated font when publication identifier is empty #90

@olivierkorner

Description

@olivierkorner

The Adobe font obfuscation algorithm key is built using the publication identifier.

If it is empty, or just urn:uuid:, the deobfuscation will crash with a "Division by zero" error because the key is empty:
https://github.com/readium/r2-streamer-swift/blob/4067b31f7e88306d66bcef253b5fb538b7b0be68/r2-streamer-swift/Parser/EPUB/Resource%20Transformers/EPUBDeobfuscator.swift#L69

If the key is empty, the deobfuscator should just return the data with transformation.

I have an EPUB to test the issue that I can send privately but not share here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions