Commit 713664b3 authored by michael's avatar michael

Check number of bits so we dont try to use table entries which dont

exist.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13785 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ecc7c8a4
...@@ -334,6 +334,10 @@ static av_cold int g726_init(AVCodecContext * avctx) ...@@ -334,6 +334,10 @@ static av_cold int g726_init(AVCodecContext * avctx)
av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n"); av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n");
return -1; return -1;
} }
if(index>3){
av_log(avctx, AV_LOG_ERROR, "Unsupported number of bits %d\n", index+2);
return -1;
}
g726_reset(&c->c, index); g726_reset(&c->c, index);
c->code_size = c->c.tbls->bits; c->code_size = c->c.tbls->bits;
c->bit_buffer = 0; c->bit_buffer = 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