Closed Bug 1305813 Opened 8 years ago Closed 7 years ago

Ensure RID isn't empty when constructing RTP header

Categories

(Core :: WebRTC: Signaling, defect, P2)

49 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: ng, Unassigned)

References

Details

Attachments

(2 files)

Check to make sure that the RID isn't empty before constructing the header.
Attachment #8795431 - Flags: review?(rjesup)
QA Contact: na-g
Attachment #8795431 - Flags: review?(rjesup) → review+
Rank: 25
Priority: -- → P2
Depends on: 1306475
Does this bug still apply after the 57 merger?
I will check.
Flags: needinfo?(na-g)
This bug should have been closed with the 49 merge. The code in question was also removed in the 57 merge though, so it is valid issue again.
Blocks: 1341285
Flags: needinfo?(na-g)
Comment on attachment 8880504 [details]
Bug 1305813 - do not send empty StreamId;

https://reviewboard.mozilla.org/r/151620/#review156900

::: media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc:329
(Diff revision 1)
>            current_rotation != kVideoRotation_0)
>          rtp_header->SetExtension<VideoOrientation>(current_rotation);
>        last_rotation_ = current_rotation;
>      }
>      if (rid) {
> -      rtp_header->SetExtensionWithLength<StreamId>(strlen(rid)-1, rid);
> +      size_t len = strlen(rid);

I'm wondering if we should protect against this actually in RTPSender::SetRID() instead or additionally?
Attachment #8880504 - Flags: review?(drno) → review+
(In reply to Nils Ohlmeier [:drno] from comment #7)
> I'm wondering if we should protect against this actually in
> RTPSender::SetRID() instead or additionally?

I am for checking additionally, and having an empty string act the same way as a nullptr.
Comment on attachment 8880504 [details]
Bug 1305813 - do not send empty StreamId;

https://reviewboard.mozilla.org/r/151620/#review156910

::: media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc:328
(Diff revision 3)
>        if (frame_type == kVideoFrameKey || current_rotation != last_rotation_ ||
>            current_rotation != kVideoRotation_0)
>          rtp_header->SetExtension<VideoOrientation>(current_rotation);
>        last_rotation_ = current_rotation;
>      }
>      if (rid) {

This is now always going to be true.
Comment on attachment 8880504 [details]
Bug 1305813 - do not send empty StreamId;

https://reviewboard.mozilla.org/r/151620/#review156932

LGTM
Pushed by na-g@nostrum.com:
https://hg.mozilla.org/integration/autoland/rev/895701cff94e
do not send empty StreamId;r=drno
https://hg.mozilla.org/mozilla-central/rev/895701cff94e
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: