Skip to content

IPv6 support issue in flb_hs_create #9423

Closed
@ryanlyy

Description

@ryanlyy

In below code, tmp length is 32. but if ipv6 address is like: 1234:5678:1234:5678:1234:5678:1234:5678. and if port is 33333. then the total length of listen address is: 32 + 7 + 5 = 44. But the buff tmp is only 32 bytes. so there will be memory issue.

/* Create ROOT endpoints */
struct flb_hs *flb_hs_create(const char *listen, const char *tcp_port,
struct flb_config *config)
{
int vid;
char tmp[32];

/* Compose listen address */
snprintf(tmp, sizeof(tmp) -1, "%s:%s", listen, tcp_port);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions