summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libwma/bitstream.c
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2008-04-07 02:11:14 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2008-04-07 02:11:14 +0000
commit231f0c208d63c76eb5c360725c651ff7d6b9f6bd (patch)
treea90605f08ed7058e6f473375bc30def0d9aca1a5 /apps/codecs/libwma/bitstream.c
parent4a808073c7b99239db10df3dabe649fd1d7b55da (diff)
downloadrockbox-231f0c208d63c76eb5c360725c651ff7d6b9f6bd.tar.gz
rockbox-231f0c208d63c76eb5c360725c651ff7d6b9f6bd.zip
Let the console know when the huffman tables have overflown. This should never happen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17012 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma/bitstream.c')
-rw-r--r--apps/codecs/libwma/bitstream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/codecs/libwma/bitstream.c b/apps/codecs/libwma/bitstream.c
index 4c4ab232ff..9e3d1863a2 100644
--- a/apps/codecs/libwma/bitstream.c
+++ b/apps/codecs/libwma/bitstream.c
@@ -106,6 +106,8 @@ static int alloc_table(VLC *vlc, int size)
index = vlc->table_size;
vlc->table_size += size;
if (vlc->table_size > vlc->table_allocated) {
+ DEBUGF("Tried to allocate past the end of a Huffman table: %d/%d\n",
+ vlc->table_allocated, vlc->table_allocated+(1 << vlc->bits));
vlc->table_allocated += (1 << vlc->bits);
if (!vlc->table)
return -1;