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

Issue 2254003002: Fixing off-by-one error with max SCTP id. (Closed)

Created:
4 years, 4 months ago by Taylor Brandstetter
Modified:
4 years, 4 months ago
Reviewers:
pthatcher1, skvlad
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, the sun
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fixing off-by-one error with max SCTP id. Normally, when creating a data channel with an out-of-range ID, createDataChannel returns nullptr. But due to an off-by-one error, creating a data channel with ID 1023 returns a data channel that silently fails later. This probably occurred because it wasn't clear whether "kMaxSctpSid" was an inclusive or exclusive maximum, so I changed the value to "kMaxSctpStreams". This wasn't caught by unit tests because the off-by-one error persisted to the unit tests as well. Also getting rid of some dead code. We were adding SCTP streams to the ContentDescription object but they weren't being used. BUG=619849 R=pthatcher@webrtc.org, skvlad@webrtc.org Committed: https://crrev.com/1d7a637340ea097ea55061af7b566ceccc2678c8 Cr-Commit-Position: refs/heads/master@{#13906}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Removing unneeded parentheses. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -65 lines) Patch
M webrtc/api/datachannel.cc View 2 chunks +2 lines, -2 lines 2 comments Download
M webrtc/api/peerconnectioninterface_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/api/webrtcsdp.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/media/sctp/sctpdataengine.h View 1 chunk +9 lines, -3 lines 2 comments Download
M webrtc/media/sctp/sctpdataengine.cc View 2 chunks +7 lines, -11 lines 0 comments Download
M webrtc/media/sctp/sctpdataengine_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/pc/mediasession.cc View 5 chunks +8 lines, -44 lines 0 comments Download

Messages

Total messages: 19 (9 generated)
Taylor Brandstetter
4 years, 4 months ago (2016-08-17 18:14:37 UTC) #3
skvlad
lgtm https://codereview.webrtc.org/2254003002/diff/1/webrtc/api/webrtcsdp.cc File webrtc/api/webrtcsdp.cc (right): https://codereview.webrtc.org/2254003002/diff/1/webrtc/api/webrtcsdp.cc#newcode1394 webrtc/api/webrtcsdp.cc:1394: << (cricket::kMaxSctpStreams); The parentheses aren't necessary any more.
4 years, 4 months ago (2016-08-17 19:13:53 UTC) #4
Taylor Brandstetter
https://codereview.webrtc.org/2254003002/diff/1/webrtc/api/webrtcsdp.cc File webrtc/api/webrtcsdp.cc (right): https://codereview.webrtc.org/2254003002/diff/1/webrtc/api/webrtcsdp.cc#newcode1394 webrtc/api/webrtcsdp.cc:1394: << (cricket::kMaxSctpStreams); On 2016/08/17 19:13:53, skvlad wrote: > The ...
4 years, 4 months ago (2016-08-17 22:39:27 UTC) #7
pthatcher1
lgtm I'd prefer to see the following nits improved, but they are nits. https://codereview.webrtc.org/2254003002/diff/20001/webrtc/api/datachannel.cc File ...
4 years, 4 months ago (2016-08-22 23:09:30 UTC) #8
Taylor Brandstetter
Please take a look again Peter. Added back kMaxSctpSid. https://codereview.webrtc.org/2254003002/diff/20001/webrtc/api/datachannel.cc File webrtc/api/datachannel.cc (right): https://codereview.webrtc.org/2254003002/diff/20001/webrtc/api/datachannel.cc#newcode34 webrtc/api/datachannel.cc:34: ...
4 years, 4 months ago (2016-08-23 00:53:14 UTC) #9
Taylor Brandstetter
Going to go ahead and commit this since the updated patchset is essentially just renaming.
4 years, 4 months ago (2016-08-24 17:44:11 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2254003002/20001
4 years, 4 months ago (2016-08-24 17:44:43 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on master.tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 4 months ago (2016-08-24 19:45:09 UTC) #15
Taylor Brandstetter
Committed patchset #2 (id:20001) manually as 1d7a637340ea097ea55061af7b566ceccc2678c8 (presubmit successful).
4 years, 4 months ago (2016-08-24 20:15:43 UTC) #18
commit-bot: I haz the power
4 years, 4 months ago (2016-08-24 20:15:43 UTC) #19
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/1d7a637340ea097ea55061af7b566ceccc2678c8
Cr-Commit-Position: refs/heads/master@{#13906}

Powered by Google App Engine
This is Rietveld 408576698