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
50c8276e
Commit
50c8276e
authored
Feb 15, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport [24941] and [25157] memory error handling
parent
f5cd18f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+8
-0
No files found.
modules/demux/mp4/mp4.c
View file @
50c8276e
...
@@ -474,6 +474,8 @@ static int Open( vlc_object_t * p_this )
...
@@ -474,6 +474,8 @@ static int Open( vlc_object_t * p_this )
/* allocate memory */
/* allocate memory */
p_sys
->
track
=
calloc
(
p_sys
->
i_tracks
,
sizeof
(
mp4_track_t
)
);
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
)
);
memset
(
p_sys
->
track
,
0
,
p_sys
->
i_tracks
*
sizeof
(
mp4_track_t
)
);
/* now process each track and extract all usefull information */
/* now process each track and extract all usefull information */
...
@@ -922,6 +924,10 @@ static int TrackCreateChunksIndex( demux_t *p_demux,
...
@@ -922,6 +924,10 @@ static int TrackCreateChunksIndex( demux_t *p_demux,
}
}
p_demux_track
->
chunk
=
calloc
(
p_demux_track
->
i_chunk_count
,
p_demux_track
->
chunk
=
calloc
(
p_demux_track
->
i_chunk_count
,
sizeof
(
mp4_chunk_t
)
);
sizeof
(
mp4_chunk_t
)
);
if
(
p_demux_track
->
chunk
==
NULL
)
{
return
VLC_ENOMEM
;
}
/* first we read chunk offset */
/* first we read chunk offset */
for
(
i_chunk
=
0
;
i_chunk
<
p_demux_track
->
i_chunk_count
;
i_chunk
++
)
for
(
i_chunk
=
0
;
i_chunk
<
p_demux_track
->
i_chunk_count
;
i_chunk
++
)
...
@@ -1034,6 +1040,8 @@ static int TrackCreateSamplesIndex( demux_t *p_demux,
...
@@ -1034,6 +1040,8 @@ static int TrackCreateSamplesIndex( demux_t *p_demux,
p_demux_track
->
i_sample_size
=
0
;
p_demux_track
->
i_sample_size
=
0
;
p_demux_track
->
p_sample_size
=
p_demux_track
->
p_sample_size
=
calloc
(
p_demux_track
->
i_sample_count
,
sizeof
(
uint32_t
)
);
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
++
)
for
(
i_sample
=
0
;
i_sample
<
p_demux_track
->
i_sample_count
;
i_sample
++
)
{
{
...
...
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