X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Ffaxcompr.c;h=44d27219ff45627b9e6cd355e630aaee9a555538;hb=575ed4fe37fdb1558fbbc261661b6239d47bcd8c;hp=155f78da66b282cf6d59ad71dfb82092104fae0a;hpb=be023405a7cdbdd6b5d163de8beb1968ee4ef52e;p=ffmpeg diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c index 155f78da66b..44d27219ff4 100644 --- a/libavcodec/faxcompr.c +++ b/libavcodec/faxcompr.c @@ -296,7 +296,8 @@ int ff_ccitt_unpack(AVCodecContext *avctx, const uint8_t *src, int srcsize, ref[0] = avctx->width; ref[1] = 0; ref[2] = 0; - init_get_bits(&gb, src, srcsize * 8); + if ((ret = init_get_bits8(&gb, src, srcsize)) < 0) + return ret; has_eol = show_bits(&gb, 12) == 1 || show_bits(&gb, 16) == 1; for (j = 0; j < height; j++) {