mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/tiff: Assert init_get_bits8() success in unpack_gray()
Helps: CID1441939 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8814cedb07
commit
a287f17db2
|
@ -457,7 +457,8 @@ static void unpack_gray(TiffContext *s, AVFrame *p,
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
uint16_t *dst = (uint16_t *)(p->data[0] + lnum * p->linesize[0]);
|
uint16_t *dst = (uint16_t *)(p->data[0] + lnum * p->linesize[0]);
|
||||||
|
|
||||||
init_get_bits8(&gb, src, width);
|
int ret = init_get_bits8(&gb, src, width);
|
||||||
|
av_assert1(ret >= 0);
|
||||||
|
|
||||||
for (int i = 0; i < s->width; i++) {
|
for (int i = 0; i < s->width; i++) {
|
||||||
dst[i] = get_bits(&gb, bpp);
|
dst[i] = get_bits(&gb, bpp);
|
||||||
|
|
Loading…
Reference in New Issue