Skip to content

zmq_z85_decode documentation is ambiguous about error behaviour #2321

Closed
@sigiesec

Description

@sigiesec

The documentation of zmq_z85_decode is ambiguous about its behaviour in case of invalid input.
It states "The encoding shall follow the ZMQ RFC 32 specification." and "The zmq_z85_decode() function shall return dest if successful, else it shall return NULL."

As implemented, it returns NULL if the length of the input is invalid, but not if it contains invalid characters. This should at least be clarified in the documentation.

However, I think that the method should be changed such that it either

  • assumes that the input is completely valid (and have undefined behaviour otherwise), or
  • validates its input more thoroughly.

I am not sure which of these alternatives better fits in with the overall API design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions