Skip to content

[Bug]: Seemingly invalid WC_ALLOC_VAR_EX invocation #9846

@Caier

Description

@Caier

Contact Details

No response

Version

a4e2d85

Description

The WC_ALLOC_VAR_EX call at

WC_ALLOC_VAR_EX(drbg, DRBG_internal, sizeof(DRBG_internal), heap,
seems to have an invalid size specified:

    WC_ALLOC_VAR_EX(drbg, DRBG_internal, sizeof(DRBG_internal), heap,
        DYNAMIC_TYPE_TMP_BUFFER, WC_DO_NOTHING);

in an environment with WOLFSSL_SMALL_STACK defined, this macro basically results in calling:

wolfSSL_Malloc(sizeof(DRBG_internal) * sizeof(DRBG_internal));

which results in a malloc call for 16384 bytes

Reproduction steps

No response

Relevant log output

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions