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
c5714097
Commit
c5714097
authored
Sep 11, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mxfdec: use av_realloc_array()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
9bca8e53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
mxfdec.c
libavformat/mxfdec.c
+3
-7
No files found.
libavformat/mxfdec.c
View file @
c5714097
...
@@ -433,10 +433,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
...
@@ -433,10 +433,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
uint64_t
footer_partition
;
uint64_t
footer_partition
;
uint32_t
nb_essence_containers
;
uint32_t
nb_essence_containers
;
if
(
mxf
->
partitions_count
+
1
>=
UINT_MAX
/
sizeof
(
*
mxf
->
partitions
))
tmp_part
=
av_realloc_array
(
mxf
->
partitions
,
mxf
->
partitions_count
+
1
,
sizeof
(
*
mxf
->
partitions
));
return
AVERROR
(
ENOMEM
);
tmp_part
=
av_realloc
(
mxf
->
partitions
,
(
mxf
->
partitions_count
+
1
)
*
sizeof
(
*
mxf
->
partitions
));
if
(
!
tmp_part
)
if
(
!
tmp_part
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
mxf
->
partitions
=
tmp_part
;
mxf
->
partitions
=
tmp_part
;
...
@@ -563,9 +560,8 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
...
@@ -563,9 +560,8 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
static
int
mxf_add_metadata_set
(
MXFContext
*
mxf
,
void
*
metadata_set
)
static
int
mxf_add_metadata_set
(
MXFContext
*
mxf
,
void
*
metadata_set
)
{
{
MXFMetadataSet
**
tmp
;
MXFMetadataSet
**
tmp
;
if
(
mxf
->
metadata_sets_count
+
1
>=
UINT_MAX
/
sizeof
(
*
mxf
->
metadata_sets
))
return
AVERROR
(
ENOMEM
);
tmp
=
av_realloc_array
(
mxf
->
metadata_sets
,
mxf
->
metadata_sets_count
+
1
,
sizeof
(
*
mxf
->
metadata_sets
));
tmp
=
av_realloc
(
mxf
->
metadata_sets
,
(
mxf
->
metadata_sets_count
+
1
)
*
sizeof
(
*
mxf
->
metadata_sets
));
if
(
!
tmp
)
if
(
!
tmp
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
mxf
->
metadata_sets
=
tmp
;
mxf
->
metadata_sets
=
tmp
;
...
...
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