Skip to content

QCBOR FinishGetSize does not set needed encoding size on small buffers #35

@jeronstone

Description

@jeronstone

QCBOREncode_FinishGetSize does not set the second argument if the output buffer is too small:

Internally, QCBOREncode_FinishGetSize checks for QCBOR_SUCCESS to set the encoding length, but on small buffers QCBOR_ERR_BUFFER_TOO_SMALL is instead returned, and the encoding length is not set.

Workaround for BSL ASB encoding: set the buffer to be as large as needed for test fixtures

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions