Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
maxsharabayko opened this issue Nov 14, 2024 · 0 comments
Labels
[API] Area: Changes in SRT library API Type: Enhancement Indicates new feature requests
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

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:

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior Type: Enhancement Indicates new feature requests [API] Area: Changes in SRT library API labels Nov 14, 2024
@maxsharabayko maxsharabayko added this to the v1.6.0 milestone Nov 14, 2024
@maxsharabayko maxsharabayko added Type: Maintenance Work required to maintain or clean up the code Type: Enhancement Indicates new feature requests and removed Type: Bug Indicates an unexpected problem or unintended behavior Type: Enhancement Indicates new feature requests Type: Maintenance Work required to maintain or clean up the code labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[API] Area: Changes in SRT library API Type: Enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

1 participant