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
1a4e4ad0
Commit
1a4e4ad0
authored
Jan 07, 2014
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mxf: Use av_malloc_array
parent
f5fbbbc0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
mxfdec.c
libavformat/mxfdec.c
+7
-7
No files found.
libavformat/mxfdec.c
View file @
1a4e4ad0
...
...
@@ -1234,9 +1234,9 @@ static int mxf_compute_index_tables(MXFContext *mxf)
}
}
if
(
mxf
->
nb_index_tables
>
INT_MAX
/
sizeof
(
MXFIndexTable
)
||
!
(
mxf
->
index_tables
=
av_mallocz
(
mxf
->
nb_index_tables
*
sizeof
(
MXFIndexTable
)))
)
{
mxf
->
index_tables
=
av_mallocz_array
(
mxf
->
nb_index_tables
,
sizeof
(
*
mxf
->
index_tables
));
if
(
!
mxf
->
index_tables
)
{
av_log
(
mxf
->
fc
,
AV_LOG_ERROR
,
"failed to allocate index tables
\n
"
);
ret
=
AVERROR
(
ENOMEM
);
goto
finish_decoding_index
;
...
...
@@ -1255,10 +1255,10 @@ static int mxf_compute_index_tables(MXFContext *mxf)
for
(
i
=
j
=
0
;
j
<
mxf
->
nb_index_tables
;
i
+=
mxf
->
index_tables
[
j
++
].
nb_segments
)
{
MXFIndexTable
*
t
=
&
mxf
->
index_tables
[
j
];
if
(
t
->
nb_segments
>
(
INT_MAX
/
sizeof
(
MXFIndexTableSegment
*
))
||
!
(
t
->
segments
=
av_mallocz
(
t
->
nb_segments
*
sizeof
(
MXFIndexTableSegment
*
)))
)
{
t
->
segments
=
av_mallocz_array
(
t
->
nb_segments
,
sizeof
(
*
t
->
segments
));
if
(
!
t
->
segments
)
{
av_log
(
mxf
->
fc
,
AV_LOG_ERROR
,
"failed to allocate IndexTableSegment"
" pointer array
\n
"
);
ret
=
AVERROR
(
ENOMEM
);
...
...
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