Commit 5ba62e89 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/loco: check the init_get_bits8() return code

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 131a1858
......@@ -130,12 +130,15 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh
{
RICEContext rc;
int val;
int ret;
int i, j;
if(buf_size<=0)
return -1;
init_get_bits8(&rc.gb, buf, buf_size);
if ((ret = init_get_bits8(&rc.gb, buf, buf_size)) < 0)
return ret;
rc.save = 0;
rc.run = 0;
rc.run2 = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment