Skip to content

wmemcpy_s ESLEMAX check does not multiply dmax by sizeof(wchar_t) #39

@lennoxho

Description

@lennoxho
    if (dmax > RSIZE_MAX_MEM) {
        invoke_safe_mem_constraint_handler("wmemcpy_s: dmax exceeds max",
                   NULL, ESLEMAX);
        return RCNEGATE(ESLEMAX);
    }

Should be

    if (dmax*sizeof(wchar_t) > RSIZE_MAX_STR) {

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