Skip to content

Listen Callback Provides a Stream ID without Length. Can't Properly Handle NULL Characters. #3073

Description

@maxsharabayko

The listen callback function (srt_listen_callback_fn) expects the following prototype:

int f(void* opaq, SRTSOCKET ns, int hsversion, const struct sockaddr* peeraddr, const char* streamid)

The SRTO_STREAMID is not yet set on a socket, hence it is provided via the streamid argument. However no notion of length is provided, meaning there is no safe way to properly handle StreamID values with NUL characters.

See related issue #2284 for get/set socket option.

Rework the function prototype to provide the length of the streamID sequence of chars.

Note other related FRs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementIndicates new feature requests[API]Area: Changes in SRT library API

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions