-
Notifications
You must be signed in to change notification settings - Fork 840
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
API: Check optlen for string OPTIONS (e.g. SRTO_STREAMID). #2845
Comments
PR #2849 should address this by returning SRT_EINVPARAM whenever optlen is set to -1 |
Wait. What was the final decision then? Note that there are already applications that RELY on that setting a string-typed option with passing -1 as length treats the string as a NUL-terminated array of characters. |
The majority has voted for not using |
Ah, in that case, it should be ok. |
Perhaps using -1 or size can also help solve #2284 |
@jlsantiago0 |
Fixed by #2849. |
Bug Description
Negative option lengths are not checked in
srt_setsockopt()
calls, except for those having integer types.A
memcpy
with the to unsigned converted negative value is being done then.To Reproduce
Expected behavior
Report
SRT_EINVPARAM
.TODO
The text was updated successfully, but these errors were encountered: