Browse code

bitpacked: fix potential overflow

Fixes: CID1404842

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

Rostislav Pehlivanov authored on 2017/04/06 04:51:13
Showing 1 changed files
... ...
@@ -59,7 +59,7 @@ static int bitpacked_decode_yuv422p10(AVCodecContext *avctx, AVFrame *frame,
59 59
                                       AVPacket *avpkt)
60 60
 {
61 61
     uint64_t frame_size = (uint64_t)avctx->width * (uint64_t)avctx->height * 20;
62
-    uint64_t packet_size = avpkt->size * 8;
62
+    uint64_t packet_size = (uint64_t)avpkt->size * 8;
63 63
     GetBitContext bc;
64 64
     uint16_t *y, *u, *v;
65 65
     int ret, i;