-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix wrong size_t* to int* conversion in 64bit Big-Endian hosts #637
Fix wrong size_t* to int* conversion in 64bit Big-Endian hosts #637
Conversation
- Fixes #636 - Ensure that we have RTP or RTCP packet length into a `int` variable since `srtp_(un)protect_xxxx()` methods expect a pointer to `int` and modify the length referenced by the given pointer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense to me
Thanks. Will wait a few days for @xia-chu. |
I'm sure it is possible to run a binary for any arch (and probably endianness) on Linux with binfmt support. |
I ❤️ Linux: decided to give it a spin on s390x (notable BE platform) Ubuntu container under Docker. Both before and after this patch following worker tests were failing identically:
So none of existing tests cover this LE/BE distinction yet. I then decided to test the actual media flow with Rust echo example, but again on both branches it neither crashed nor produces any audio or video on receiving side. I guess actual s390x hardware is needed to test it properly or I missed something important or it is not going to work on BE platform without more testing and fixes 🤷 |
Wow amazing catch! Hi @jmillan (once you are back), look at this! |
Thank you for your work and excellent project.
|
The |
This is where zlmediakit refers to the mediasoup source code |
Actually you reported a real issue and provided all the needed info, so of course... thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
int
variable sincesrtp_(un)protect_xxxx()
methods expect a pointer toint
and modify the length referenced by the given pointer.