[FFmpeg-cvslog] bitpacked: fix potential overflow

Rostislav Pehlivanov git at videolan.org
Wed Apr 5 22:53:02 EEST 2017


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Wed Apr  5 20:51:13 2017 +0100| [c901ae944040855e05b25f8d81be6b6f327ce2a4] | committer: Rostislav Pehlivanov

bitpacked: fix potential overflow

Fixes: CID1404842

Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>

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

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

diff --git a/libavcodec/bitpacked.c b/libavcodec/bitpacked.c
index 949d20c..2af8126 100644
--- a/libavcodec/bitpacked.c
+++ b/libavcodec/bitpacked.c
@@ -59,7 +59,7 @@ static int bitpacked_decode_yuv422p10(AVCodecContext *avctx, AVFrame *frame,
                                       AVPacket *avpkt)
 {
     uint64_t frame_size = (uint64_t)avctx->width * (uint64_t)avctx->height * 20;
-    uint64_t packet_size = avpkt->size * 8;
+    uint64_t packet_size = (uint64_t)avpkt->size * 8;
     GetBitContext bc;
     uint16_t *y, *u, *v;
     int ret, i;



More information about the ffmpeg-cvslog mailing list