Skip to content

memory allocation error #110

@marcstern

Description

@marcstern

in jwe.c, on line 1952:

cek = cjose_get_alloc()(cek_len);
memcpy(cek, jwe->cek, cek_len);

Allocation result is not checked. We should add

if (!cek) {
   CJOSE_ERROR(err, CJOSE_ERR_NO_MEMORY);
   return NULL;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions