Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
0a336af7
Commit
0a336af7
authored
10 years ago
by
Guillaume Roguez
Committed by
Tristan Matthews
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
daemon: fix possible null access during sdp modifications
Refs #62705 Change-Id: I86844674ad6390c4b5c805c7458a563dc0b8d91b
parent
007a30e5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/sip/sdp.cpp
+13
-3
13 additions, 3 deletions
daemon/src/sip/sdp.cpp
with
13 additions
and
3 deletions
daemon/src/sip/sdp.cpp
+
13
−
3
View file @
0a336af7
...
@@ -856,7 +856,11 @@ void Sdp::addZrtpAttribute(pjmedia_sdp_media* media, std::string hash)
...
@@ -856,7 +856,11 @@ void Sdp::addZrtpAttribute(pjmedia_sdp_media* media, std::string hash)
void
void
Sdp
::
addIceCandidates
(
unsigned
media_index
,
const
std
::
vector
<
std
::
string
>&
cands
)
Sdp
::
addIceCandidates
(
unsigned
media_index
,
const
std
::
vector
<
std
::
string
>&
cands
)
{
{
assert
(
media_index
<
localSession_
->
media_count
);
if
(
media_index
>=
localSession_
->
media_count
)
{
SFL_ERR
(
"addIceCandidates failed: cannot access media#%u (may be deactivated)"
,
media_index
);
return
;
}
auto
media
=
localSession_
->
media
[
media_index
];
auto
media
=
localSession_
->
media
[
media_index
];
for
(
const
auto
&
item
:
cands
)
{
for
(
const
auto
&
item
:
cands
)
{
...
@@ -872,8 +876,14 @@ std::vector<std::string>
...
@@ -872,8 +876,14 @@ std::vector<std::string>
Sdp
::
getIceCandidates
(
unsigned
media_index
)
const
Sdp
::
getIceCandidates
(
unsigned
media_index
)
const
{
{
auto
session
=
remoteSession_
?
remoteSession_
:
activeRemoteSession_
;
auto
session
=
remoteSession_
?
remoteSession_
:
activeRemoteSession_
;
assert
(
session
);
if
(
not
session
)
{
assert
(
media_index
<
session
->
media_count
);
SFL_ERR
(
"getIceCandidates failed: no remote session"
);
return
{};
}
if
(
media_index
>=
session
->
media_count
)
{
SFL_ERR
(
"getIceCandidates failed: cannot access media#%u (may be deactivated)"
,
media_index
);
return
{};
}
auto
media
=
session
->
media
[
media_index
];
auto
media
=
session
->
media
[
media_index
];
std
::
vector
<
std
::
string
>
candidates
;
std
::
vector
<
std
::
string
>
candidates
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment