summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-20 17:32:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-20 17:32:17 +0200
commit8c88ea76df9b692cc40c4a4826534a02d38a088a (patch)
tree64d0c9695bc422e5c9d5e01a794494f29c018b7d /libavcodec/tiff.c
parent1fd5c7f1ee2fe32b6ea027a1252e8a52fc034d7d (diff)
avcodec/tiff: use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index c6193ad47a..02d50077ab 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -838,7 +838,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
s->geotag_count = 0;
return -1;
}
- s->geotags = av_mallocz(sizeof(TiffGeoTag) * s->geotag_count);
+ s->geotags = av_mallocz_array(s->geotag_count, sizeof(TiffGeoTag));
if (!s->geotags) {
av_log(s->avctx, AV_LOG_ERROR, "Error allocating temporary buffer\n");
s->geotag_count = 0;
@@ -860,7 +860,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
return AVERROR_INVALIDDATA;
if (bytestream2_get_bytes_left(&s->gb) < count * sizeof(int64_t))
return AVERROR_INVALIDDATA;
- dp = av_malloc(count * sizeof(double));
+ dp = av_malloc_array(count, sizeof(double));
if (!dp) {
av_log(s->avctx, AV_LOG_ERROR, "Error allocating temporary buffer\n");
goto end;