BUF_MEM_grow

Grow or shrink a BUF_MEM so its valid length is len.

Synopsis

Declared in <openssl/buffer.h>

size_t
BUF_MEM_grow(
    BUF_MEM* str,
    size_t len);

Description

Newly allocated capacity beyond the previous length is left uninitialized; use BUF_MEM_grow_clean() when cleared growth is required.

Return Value

New length on success, or 0 on allocation failure.

Parameters

NameDescription
strBuffer to resize.
lenDesired length in bytes; expands capacity when needed.