Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
24130234
Commit
24130234
authored
Aug 19, 2016
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpdec_mpeg4: validate fmtp fields
parent
46e3936f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
rtpdec_mpeg4.c
libavformat/rtpdec_mpeg4.c
+14
-3
No files found.
libavformat/rtpdec_mpeg4.c
View file @
24130234
...
...
@@ -290,11 +290,22 @@ static int parse_fmtp(AVFormatContext *s,
for
(
i
=
0
;
attr_names
[
i
].
str
;
++
i
)
{
if
(
!
av_strcasecmp
(
attr
,
attr_names
[
i
].
str
))
{
if
(
attr_names
[
i
].
type
==
ATTR_NAME_TYPE_INT
)
{
int
val
=
atoi
(
value
);
if
(
val
>
32
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"The %s field size is invalid (%d)."
,
attr
,
val
);
return
AVERROR_INVALIDDATA
;
}
*
(
int
*
)((
char
*
)
data
+
attr_names
[
i
].
offset
)
=
atoi
(
value
);
}
else
if
(
attr_names
[
i
].
type
==
ATTR_NAME_TYPE_STR
)
attr_names
[
i
].
offset
)
=
val
;
}
else
if
(
attr_names
[
i
].
type
==
ATTR_NAME_TYPE_STR
)
{
char
*
val
=
av_strdup
(
value
);
if
(
!
val
)
return
AVERROR
(
ENOMEM
);
*
(
char
**
)((
char
*
)
data
+
attr_names
[
i
].
offset
)
=
av_strdup
(
value
);
attr_names
[
i
].
offset
)
=
val
;
}
}
}
}
...
...
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