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
ab82b778
Commit
ab82b778
authored
Nov 18, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix possible NULL-pointer dereference when decoding mov files.
Fixes CID743440, introduced in
850e5c04
.
parent
dab19048
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
mov.c
libavformat/mov.c
+2
-1
No files found.
libavformat/mov.c
View file @
ab82b778
...
@@ -1384,6 +1384,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
...
@@ -1384,6 +1384,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
}
else
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
}
else
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
int
bits_per_sample
,
flags
;
int
bits_per_sample
,
flags
;
uint16_t
version
=
avio_rb16
(
pb
);
uint16_t
version
=
avio_rb16
(
pb
);
AVDictionaryEntry
*
compatible_brands
=
av_dict_get
(
c
->
fc
->
metadata
,
"compatible_brands"
,
NULL
,
AV_DICT_MATCH_CASE
);
st
->
codec
->
codec_id
=
id
;
st
->
codec
->
codec_id
=
id
;
avio_rb16
(
pb
);
/* revision level */
avio_rb16
(
pb
);
/* revision level */
...
@@ -1401,7 +1402,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
...
@@ -1401,7 +1402,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
//Read QT version 1 fields. In version 0 these do not exist.
//Read QT version 1 fields. In version 0 these do not exist.
av_dlog
(
c
->
fc
,
"version =%d, isom =%d
\n
"
,
version
,
c
->
isom
);
av_dlog
(
c
->
fc
,
"version =%d, isom =%d
\n
"
,
version
,
c
->
isom
);
if
(
!
c
->
isom
||
if
(
!
c
->
isom
||
strstr
(
av_dict_get
(
c
->
fc
->
metadata
,
"compatible_brands"
,
NULL
,
AV_DICT_MATCH_CASE
)
->
value
,
"qt "
))
{
(
compatible_brands
&&
strstr
(
compatible_brands
->
value
,
"qt "
)
))
{
if
(
version
==
1
)
{
if
(
version
==
1
)
{
sc
->
samples_per_frame
=
avio_rb32
(
pb
);
sc
->
samples_per_frame
=
avio_rb32
(
pb
);
avio_rb32
(
pb
);
/* bytes per packet */
avio_rb32
(
pb
);
/* bytes per packet */
...
...
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