Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
456bdd9f
Commit
456bdd9f
authored
Feb 15, 2008
by
Rémi Denis-Courmont
Browse files
Fix two more calloc-based denial of service in the MP4 demux.
parent
4d12ba40
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/demux/mp4/mp4.c
View file @
456bdd9f
...
...
@@ -485,6 +485,8 @@ static int Open( vlc_object_t * p_this )
/* allocate memory */
p_sys
->
track
=
calloc
(
p_sys
->
i_tracks
,
sizeof
(
mp4_track_t
)
);
if
(
p_sys
->
track
==
NULL
)
goto
error
;
memset
(
p_sys
->
track
,
0
,
p_sys
->
i_tracks
*
sizeof
(
mp4_track_t
)
);
/* Search the first chap reference (like quicktime) */
...
...
@@ -1232,6 +1234,8 @@ static int TrackCreateSamplesIndex( demux_t *p_demux,
p_demux_track
->
i_sample_size
=
0
;
p_demux_track
->
p_sample_size
=
calloc
(
p_demux_track
->
i_sample_count
,
sizeof
(
uint32_t
)
);
if
(
p_demux_track
->
p_sample_size
==
NULL
)
return
VLC_ENOMEM
;
for
(
i_sample
=
0
;
i_sample
<
p_demux_track
->
i_sample_count
;
i_sample
++
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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