Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: webrtc/media/sctp/sctpdataengine.cc

Issue 2318653003: Fixing stack buffer overflow (read) in SctpDataEngine. (Closed)
Patch Set: Getting rid of unneeded cast. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/sctp/sctpdataengine.cc
diff --git a/webrtc/media/sctp/sctpdataengine.cc b/webrtc/media/sctp/sctpdataengine.cc
index 2d8d48eee370fe2f79721261df3ed7e39cdd3b66..a724b2af69a5df86293f828e7bde4e2a7b2da796 100644
--- a/webrtc/media/sctp/sctpdataengine.cc
+++ b/webrtc/media/sctp/sctpdataengine.cc
@@ -550,8 +550,7 @@ bool SctpDataMediaChannel::Connect() {
// Set the MTU and disable MTU discovery.
// We can only do this after usrsctp_connect or it has no effect.
sctp_paddrparams params = {{0}};
- memcpy(reinterpret_cast<sockaddr*>(&params.spp_address),
- reinterpret_cast<sockaddr*>(&remote_sconn), sizeof(sockaddr));
+ memcpy(&params.spp_address, &remote_sconn, sizeof(remote_sconn));
params.spp_flags = SPP_PMTUD_DISABLE;
params.spp_pathmtu = kSctpMtu;
if (usrsctp_setsockopt(sock_, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &params,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698