Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
7d587fff
Commit
7d587fff
authored
Jun 23, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix use of uninitialized URI string pointer in SAP announce - closes #228
parent
0ae7c612
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/stream_output/sap.c
src/stream_output/sap.c
+8
-5
No files found.
src/stream_output/sap.c
View file @
7d587fff
...
@@ -585,7 +585,7 @@ static int SDPGenerate( sap_handler_t *p_sap, session_descriptor_t *p_session )
...
@@ -585,7 +585,7 @@ static int SDPGenerate( sap_handler_t *p_sap, session_descriptor_t *p_session )
{
{
int64_t
i_sdp_id
=
mdate
();
int64_t
i_sdp_id
=
mdate
();
int
i_sdp_version
=
1
+
p_sap
->
i_sessions
+
(
rand
()
&
0xfff
);
int
i_sdp_version
=
1
+
p_sap
->
i_sessions
+
(
rand
()
&
0xfff
);
char
*
psz_group
,
*
psz_name
,
psz_uri
[
NI_MAXHOST
]
;
char
*
psz_group
,
*
psz_name
,
psz_uri
buf
[
NI_MAXHOST
],
*
psz_uri
;
char
ipv
;
char
ipv
;
psz_group
=
convert_to_utf8
(
p_sap
,
p_session
->
psz_group
);
psz_group
=
convert_to_utf8
(
p_sap
,
p_session
->
psz_group
);
...
@@ -598,15 +598,18 @@ static int SDPGenerate( sap_handler_t *p_sap, session_descriptor_t *p_session )
...
@@ -598,15 +598,18 @@ static int SDPGenerate( sap_handler_t *p_sap, session_descriptor_t *p_session )
{
{
char
*
ptr
;
char
*
ptr
;
strncpy
(
psz_uri
,
p_session
->
psz_uri
+
1
,
sizeof
(
psz_uri
)
);
strncpy
(
psz_uri
buf
,
p_session
->
psz_uri
+
1
,
sizeof
(
psz_uribuf
)
);
psz_uri
[
sizeof
(
psz_uri
)
-
1
]
=
'\0'
;
psz_uri
buf
[
sizeof
(
psz_uribuf
)
-
1
]
=
'\0'
;
ptr
=
strchr
(
psz_uri
,
'%'
);
ptr
=
strchr
(
psz_uri
buf
,
'%'
);
if
(
ptr
!=
NULL
)
if
(
ptr
!=
NULL
)
*
ptr
=
'\0'
;
*
ptr
=
'\0'
;
ptr
=
strchr
(
psz_uri
,
']'
);
ptr
=
strchr
(
psz_uri
buf
,
']'
);
if
(
ptr
!=
NULL
)
if
(
ptr
!=
NULL
)
*
ptr
=
'\0'
;
*
ptr
=
'\0'
;
psz_uri
=
psz_uribuf
;
}
}
else
psz_uri
=
p_session
->
psz_uri
;
/* see the lists in modules/stream_out/rtp.c for compliance stuff */
/* see the lists in modules/stream_out/rtp.c for compliance stuff */
p_session
->
psz_sdp
=
(
char
*
)
malloc
(
p_session
->
psz_sdp
=
(
char
*
)
malloc
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment