summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-01-07 21:56:33 +0100
committerLuca Barbato <lu_zero@gentoo.org>2014-01-14 18:13:29 +0100
commitf5fbbbc022f723d3ccf99afd5d658a977b51c08a (patch)
tree2b1940ef1a5215e25015df7993a5c4219ce622a9 /libavformat/mxfdec.c
parentaa0cb16c15a5b30f78542f18e3fa65de005cf084 (diff)
mxf: Drop unnecessary checks
av_reallocp_array does the check already.
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r--libavformat/mxfdec.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 3299e16528..2734e14e53 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -418,9 +418,6 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
uint32_t nb_essence_containers;
int err;
- if (mxf->partitions_count+1 >= UINT_MAX / sizeof(*mxf->partitions))
- return AVERROR(ENOMEM);
-
if ((err = av_reallocp_array(&mxf->partitions, mxf->partitions_count + 1,
sizeof(*mxf->partitions))) < 0) {
mxf->partitions_count = 0;
@@ -552,8 +549,6 @@ static int mxf_add_metadata_set(MXFContext *mxf, void *metadata_set)
{
int err;
- if (mxf->metadata_sets_count+1 >= UINT_MAX / sizeof(*mxf->metadata_sets))
- return AVERROR(ENOMEM);
if ((err = av_reallocp_array(&mxf->metadata_sets, mxf->metadata_sets_count + 1,
sizeof(*mxf->metadata_sets))) < 0) {
mxf->metadata_sets_count = 0;