[FFmpeg-cvslog] avcodec/faxcompr: use av_malloc_array()
Michael Niedermayer
git at videolan.org
Sat Apr 12 15:46:48 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr 12 15:37:57 2014 +0200| [713e62e91d235311faf1ae80777919ae7826b013] | committer: Michael Niedermayer
avcodec/faxcompr: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=713e62e91d235311faf1ae80777919ae7826b013
---
libavcodec/faxcompr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c
index 900851b..155f78d 100644
--- a/libavcodec/faxcompr.c
+++ b/libavcodec/faxcompr.c
@@ -287,8 +287,8 @@ int ff_ccitt_unpack(AVCodecContext *avctx, const uint8_t *src, int srcsize,
int runsize = avctx->width + 2;
int has_eol;
- runs = av_malloc(runsize * sizeof(runs[0]));
- ref = av_malloc(runsize * sizeof(ref[0]));
+ runs = av_malloc_array(runsize, sizeof(runs[0]));
+ ref = av_malloc_array(runsize, sizeof(ref[0]));
if (!runs || !ref) {
ret = AVERROR(ENOMEM);
goto fail;
More information about the ffmpeg-cvslog
mailing list