Skip to content

Commit

Permalink
2.0.13: Avoid crash when no remote IP/port is given.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Feb 6, 2018
1 parent b3b4a94 commit 5bba968
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog


### 2.0.13

* Avoid crash when no remote IP/port is given.


### 2.0.12

* Add `handled` and `unhandled` events to `Consumer`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mediasoup",
"version": "2.0.12",
"version": "2.0.13",
"description": "Cutting Edge WebRTC Video Conferencing",
"author": "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
"contributors": [
Expand Down
25 changes: 21 additions & 4 deletions worker/src/RTC/Router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,21 @@ namespace RTC
RTC::PlainRtpTransport::Options options;

if (!request->data[JsonStringRemoteIP].isString())
MS_THROW_ERROR("missing remoteIP");
{
request->Reject("missing remoteIP");

return;
}

options.remoteIP = request->data[JsonStringRemoteIP].asString();

if (!request->data[JsonStringRemotePort].isUInt())
MS_THROW_ERROR("missing remotePort");
{
request->Reject("missing remotePort");

return;
}

options.remotePort = request->data[JsonStringRemotePort].asUInt();

RTC::PlainRtpTransport* plainRtpTransport;
Expand Down Expand Up @@ -849,12 +858,20 @@ namespace RTC
RTC::Transport::MirroringOptions options;

if (!request->data[JsonStringRemoteIP].isString())
MS_THROW_ERROR("missing remoteIP");
{
request->Reject("missing remoteIP");

return;
}

options.remoteIP = request->data[JsonStringRemoteIP].asString();

if (!request->data[JsonStringRemotePort].isUInt())
MS_THROW_ERROR("missing remotePort");
{
request->Reject("missing remotePort");

return;
}

options.remotePort = request->data[JsonStringRemotePort].asUInt();

Expand Down

0 comments on commit 5bba968

Please sign in to comment.