Skip to content

Crash in dataFromBase64String #7

@benweiss

Description

@benweiss

If the input string contains no valid base64 data, this routine will crash. For instance: if the input is a string containing just spaces (and thus no valid base64 data), then NewBase64Decode() returns a valid pointer but an invalid (-1) length. dataFromBase64String() subsequently tries to allocate a NSData block of size (-1), which crashes. This situation should be checked for and handled appropriately.

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