Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
34d9105e
Commit
34d9105e
authored
Apr 13, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: meta != udta/meta
stop trying to read random atoms
parent
34f2fc37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+25
-5
No files found.
modules/demux/mp4/libmp4.c
View file @
34d9105e
...
...
@@ -2854,13 +2854,33 @@ static int MP4_ReadBox_meta( stream_t *p_stream, MP4_Box_t *p_box )
if
(
i_actually_read
<
8
)
return
0
;
/* meta content starts with a 4 byte version/flags value (should be 0) */
i_actually_read
=
stream_Read
(
p_stream
,
meta_data
,
4
);
if
(
i_actually_read
<
4
)
if
(
!
p_box
->
p_father
)
return
0
;
/* then it behaves like a container */
return
MP4_ReadBoxContainerRaw
(
p_stream
,
p_box
);
switch
(
p_box
->
p_father
->
i_type
)
{
case
ATOM_udta
:
/* itunes udta/meta */
/* meta content starts with a 4 byte version/flags value (should be 0) */
i_actually_read
=
stream_Read
(
p_stream
,
meta_data
,
4
);
if
(
i_actually_read
<
4
)
return
0
;
/* then it behaves like a container */
return
MP4_ReadBoxContainerRaw
(
p_stream
,
p_box
);
default:
/* regular meta atom */
i_actually_read
=
stream_Read
(
p_stream
,
meta_data
,
8
);
if
(
i_actually_read
<
8
)
return
0
;
/* Mandatory */
if
(
VLC_FOURCC
(
meta_data
[
4
],
meta_data
[
5
],
meta_data
[
6
],
meta_data
[
7
]
)
!=
ATOM_hdlr
)
return
0
;
//ft
}
return
1
;
}
static
int
MP4_ReadBox_iods
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
...
...
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