-
-
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
[Bug] srtp will crash on 64 bit big-endian machine #636
Comments
Thanks a lot. Will check and fix it in next days. |
- 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.
Thanks for the report. Would you mind taking a look to PR #637 (and test it if possible)? |
Thank you very much, but I don't have a big-endian machine to test. I also received these feedback from others。 |
- 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.
Please, next time don't close the issue. Let's please close the issue (automatically) when the PR that solves it is merged. |
ok thanks!
发自我的iPhone
…------------------ Original ------------------
From: Iñaki Baz Castillo ***@***.***>
Date: Mon,Aug 16,2021 9:46 PM
To: versatica/mediasoup ***@***.***>
Cc: 夏楚 ***@***.***>, State change ***@***.***>
Subject: Re: [versatica/mediasoup] [Bug] srtp will crash on 64 bit big-endian machine (#636)
Please, next time don't close the issue. Let's please close the issue (automatically) when the PR that solves it is merged.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Bug Report
Srtp will crash on 64 bit big-endian machine
Your environment
Issue description
These code my cause crash:
mediasoup/worker/src/RTC/SrtpSession.cpp
Line 164 in 73ec18a
The
len
parameter is the type ofsize_t*
, which on 64 bit environment, it is a 64 bit integer number。But
int
usually will be 32 bit long, if we take address of 64 bit integer number asint *
on big-endian machine,we will take the address of its high 4 bytes。If
srtp
write vlaue1024
to it, the vlaue oflen
will be1024 << 32
.The text was updated successfully, but these errors were encountered: