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

Name

Description

str

Buffer to resize.

len

Desired length in bytes; expands capacity when needed.

Created with MrDocs