diff options
author | Reynaldo H. Verdejo Pinochet <reynaldo@opendot.cl> | 2009-04-12 21:48:43 +0000 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <reynaldo@opendot.cl> | 2009-04-12 21:48:43 +0000 |
commit | 8bf7a510b92695e4ef4dc26e3b039049e6ddcbd9 (patch) | |
tree | eb56f842c7a30c68573da3658c630c2e4f172b3d | |
parent | 5137235e0cc19175bc96eecd0762ab3398d5c4a8 (diff) | |
download | ffmpeg-8bf7a510b92695e4ef4dc26e3b039049e6ddcbd9.tar.gz |
Fix wrong size computation for buffer. Patch is part of
netgem's changeset.
Originally committed as revision 18477 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/dvbsubdec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index a10f97bb2f..e2e8d5f913 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -439,9 +439,9 @@ static int dvbsub_read_2bit_string(uint8_t *destbuf, int dbuf_len, int run_length; int pixels_read = 0; - init_get_bits(&gb, *srcbuf, buf_size << 8); + init_get_bits(&gb, *srcbuf, buf_size << 3); - while (get_bits_count(&gb) < (buf_size << 8) && pixels_read < dbuf_len) { + while (get_bits_count(&gb) < buf_size << 3 && pixels_read < dbuf_len) { bits = get_bits(&gb, 2); if (bits) { @@ -544,9 +544,9 @@ static int dvbsub_read_4bit_string(uint8_t *destbuf, int dbuf_len, int run_length; int pixels_read = 0; - init_get_bits(&gb, *srcbuf, buf_size << 8); + init_get_bits(&gb, *srcbuf, buf_size << 3); - while (get_bits_count(&gb) < (buf_size << 8) && pixels_read < dbuf_len) { + while (get_bits_count(&gb) < buf_size << 3 && pixels_read < dbuf_len) { bits = get_bits(&gb, 4); if (bits) { |