Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
7d4a9c96
Commit
7d4a9c96
authored
Sep 11, 2007
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use va_copy, so you don't use same va_list twice.
parent
e20f85d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/stream_output/sdp.c
src/stream_output/sdp.c
+4
-1
No files found.
src/stream_output/sdp.c
View file @
7d4a9c96
...
@@ -161,6 +161,8 @@ static char *
...
@@ -161,6 +161,8 @@ static char *
vsdp_AddAttribute
(
char
**
sdp
,
const
char
*
name
,
const
char
*
fmt
,
va_list
ap
)
vsdp_AddAttribute
(
char
**
sdp
,
const
char
*
name
,
const
char
*
fmt
,
va_list
ap
)
{
{
size_t
oldlen
=
strlen
(
*
sdp
);
size_t
oldlen
=
strlen
(
*
sdp
);
va_list
aq
;
va_copy
(
aq
,
ap
);
size_t
addlen
=
size_t
addlen
=
sizeof
(
"a=:
\r\n
"
)
+
strlen
(
name
)
+
vsnprintf
(
NULL
,
0
,
fmt
,
ap
);
sizeof
(
"a=:
\r\n
"
)
+
strlen
(
name
)
+
vsnprintf
(
NULL
,
0
,
fmt
,
ap
);
char
*
ret
=
realloc
(
*
sdp
,
oldlen
+
addlen
);
char
*
ret
=
realloc
(
*
sdp
,
oldlen
+
addlen
);
...
@@ -169,7 +171,8 @@ vsdp_AddAttribute (char **sdp, const char *name, const char *fmt, va_list ap)
...
@@ -169,7 +171,8 @@ vsdp_AddAttribute (char **sdp, const char *name, const char *fmt, va_list ap)
return
NULL
;
return
NULL
;
oldlen
+=
sprintf
(
ret
+
oldlen
,
"a=%s:"
,
name
);
oldlen
+=
sprintf
(
ret
+
oldlen
,
"a=%s:"
,
name
);
oldlen
+=
vsprintf
(
ret
+
oldlen
,
fmt
,
ap
);
oldlen
+=
vsprintf
(
ret
+
oldlen
,
fmt
,
aq
);
va_end
(
aq
);
strcpy
(
ret
+
oldlen
,
"
\r\n
"
);
strcpy
(
ret
+
oldlen
,
"
\r\n
"
);
return
*
sdp
=
ret
;
return
*
sdp
=
ret
;
}
}
...
...
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