[FFmpeg-cvslog] bgmc: check the correct pointers

Michael Niedermayer git at videolan.org
Sat Oct 20 16:26:36 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 20 15:32:59 2012 +0200| [d7cabb3c7e843c2028b398cb19a40db84d40c790] | committer: Michael Niedermayer

bgmc: check the correct pointers

Fixes CID90539, CID90538
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7cabb3c7e843c2028b398cb19a40db84d40c790
---

 libavcodec/bgmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/bgmc.c b/libavcodec/bgmc.c
index 8b84ebf..f48ac2e 100644
--- a/libavcodec/bgmc.c
+++ b/libavcodec/bgmc.c
@@ -461,7 +461,7 @@ int ff_bgmc_init(AVCodecContext *avctx, uint8_t **cf_lut, int **cf_lut_status)
     *cf_lut        = av_malloc(sizeof(**cf_lut)        * LUT_BUFF * 16 * LUT_SIZE);
     *cf_lut_status = av_malloc(sizeof(**cf_lut_status) * LUT_BUFF);
 
-    if (!cf_lut || !cf_lut_status) {
+    if (!*cf_lut || !*cf_lut_status) {
         ff_bgmc_end(cf_lut, cf_lut_status);
         av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
         return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list