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
60fcc19b
Commit
60fcc19b
authored
Oct 31, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asfdec: Check packet_replic_size earlier
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8475ec19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
asfdec.c
libavformat/asfdec.c
+4
-4
No files found.
libavformat/asfdec.c
View file @
60fcc19b
...
...
@@ -822,6 +822,10 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
DO_2BITS
(
asf
->
packet_property
>>
2
,
asf
->
packet_frag_offset
,
0
);
DO_2BITS
(
asf
->
packet_property
,
asf
->
packet_replic_size
,
0
);
//printf("key:%d stream:%d seq:%d offset:%d replic_size:%d\n", asf->packet_key_frame, asf->stream_index, asf->packet_seq, //asf->packet_frag_offset, asf->packet_replic_size);
if
(
rsize
+
asf
->
packet_replic_size
>
asf
->
packet_size_left
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"packet_replic_size %d is invalid
\n
"
,
asf
->
packet_replic_size
);
return
-
1
;
}
if
(
asf
->
packet_replic_size
>=
8
)
{
asf
->
packet_obj_size
=
avio_rl32
(
pb
);
if
(
asf
->
packet_obj_size
>=
(
1
<<
24
)
||
asf
->
packet_obj_size
<=
0
){
...
...
@@ -856,10 +860,6 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb){
av_log
(
s
,
AV_LOG_ERROR
,
"unexpected packet_replic_size of %d
\n
"
,
asf
->
packet_replic_size
);
return
-
1
;
}
if
(
rsize
>
asf
->
packet_size_left
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"packet_replic_size is invalid
\n
"
);
return
-
1
;
}
if
(
asf
->
packet_flags
&
0x01
)
{
DO_2BITS
(
asf
->
packet_segsizetype
>>
6
,
asf
->
packet_frag_size
,
0
);
// 0 is illegal
if
(
rsize
>
asf
->
packet_size_left
)
{
...
...
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