projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8161c28
)
Check number of bits so we do not try to use table entries which do not exist.
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 16 Jun 2008 23:16:44 +0000
(23:16 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 16 Jun 2008 23:16:44 +0000
(23:16 +0000)
Originally committed as revision 13785 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/g726.c
patch
|
blob
|
history
diff --git
a/libavcodec/g726.c
b/libavcodec/g726.c
index
15c5fa6
..
13dce4f
100644
(file)
--- a/
libavcodec/g726.c
+++ b/
libavcodec/g726.c
@@
-334,6
+334,10
@@
static av_cold int g726_init(AVCodecContext * avctx)
av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n");
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);
c->code_size = c->c.tbls->bits;
c->bit_buffer = 0;