From 1aa388d4397e8d4a45aee1b4404ec812d2c91b87 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 23 Apr 2014 15:52:45 +0200 Subject: avcodec/jpeg2000dwt: use av_malloc_array() Signed-off-by: Michael Niedermayer --- libavcodec/jpeg2000dwt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavcodec/jpeg2000dwt.c') diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c index 266edece04..ceceda36dc 100644 --- a/libavcodec/jpeg2000dwt.c +++ b/libavcodec/jpeg2000dwt.c @@ -518,17 +518,17 @@ int ff_jpeg2000_dwt_init(DWTContext *s, uint16_t border[2][2], } switch (type) { case FF_DWT97: - s->f_linebuf = av_malloc((maxlen + 12) * sizeof(*s->f_linebuf)); + s->f_linebuf = av_malloc_array((maxlen + 12), sizeof(*s->f_linebuf)); if (!s->f_linebuf) return AVERROR(ENOMEM); break; case FF_DWT97_INT: - s->i_linebuf = av_malloc((maxlen + 12) * sizeof(*s->i_linebuf)); + s->i_linebuf = av_malloc_array((maxlen + 12), sizeof(*s->i_linebuf)); if (!s->i_linebuf) return AVERROR(ENOMEM); break; case FF_DWT53: - s->i_linebuf = av_malloc((maxlen + 6) * sizeof(*s->i_linebuf)); + s->i_linebuf = av_malloc_array((maxlen + 6), sizeof(*s->i_linebuf)); if (!s->i_linebuf) return AVERROR(ENOMEM); break; -- cgit v1.2.3