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
445a02b1
Commit
445a02b1
authored
Apr 12, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/rtpdec_asf: Fix potential pointer overflow
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
870ec3f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
rtpdec_asf.c
libavformat/rtpdec_asf.c
+5
-2
No files found.
libavformat/rtpdec_asf.c
View file @
445a02b1
...
...
@@ -54,6 +54,7 @@ static int rtp_asf_fix_header(uint8_t *buf, int len)
p
+=
sizeof
(
ff_asf_guid
)
+
14
;
do
{
uint64_t
chunksize
=
AV_RL64
(
p
+
sizeof
(
ff_asf_guid
));
int
skip
=
6
*
8
+
3
*
4
+
sizeof
(
ff_asf_guid
)
*
2
;
if
(
memcmp
(
p
,
ff_asf_file_header
,
sizeof
(
ff_asf_guid
)))
{
if
(
chunksize
>
end
-
p
)
return
-
1
;
...
...
@@ -61,9 +62,11 @@ static int rtp_asf_fix_header(uint8_t *buf, int len)
continue
;
}
if
(
end
-
p
<
8
+
skip
)
break
;
/* skip most of the file header, to min_pktsize */
p
+=
6
*
8
+
3
*
4
+
sizeof
(
ff_asf_guid
)
*
2
;
if
(
p
+
8
<=
end
&&
AV_RL32
(
p
)
==
AV_RL32
(
p
+
4
))
{
p
+=
skip
;
if
(
AV_RL32
(
p
)
==
AV_RL32
(
p
+
4
))
{
/* and set that to zero */
AV_WL32
(
p
,
0
);
return
0
;
...
...
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