summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <xiphmont@xiph.org>2007-06-23 09:17:01 +0000
committerMonty <xiphmont@xiph.org>2007-06-23 09:17:01 +0000
commit0f68e947155bd4fd0c4675bc0340e7a88f433ecb (patch)
treea201e9949b9b728fcf7f83aa118d3ebd3f4e5d29
parent5d3dbdf215a8785ee7ef122b63014742f4fc6895 (diff)
downloadtremor-0f68e947155bd4fd0c4675bc0340e7a88f433ecb.tar.gz
Increase defult debugging malloc head alignment
One more 'force eop' fix when speculative codebook decode runs off the end of a packet git-svn-id: https://svn.xiph.org/branches/lowmem-branch/Tremor@13184 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--codebook.c3
-rw-r--r--floor1.c5
-rw-r--r--misc.c2
3 files changed, 4 insertions, 6 deletions
diff --git a/codebook.c b/codebook.c
index 3e28660..9157228 100644
--- a/codebook.c
+++ b/codebook.c
@@ -191,7 +191,6 @@ static int _make_decode_table(codebook *s,char *lengthlist,long quantvals,
int i;
ogg_uint32_t *work;
-
if(s->dec_nodeb==4){
s->dec_table=_ogg_malloc((s->used_entries*2+1)*sizeof(*work));
/* +1 (rather than -2) is to accommodate 0 and 1 sized books,
@@ -633,7 +632,7 @@ static inline ogg_uint32_t decode_packed_entry_number(codebook *book,
oggpack_adv(b,i+1);
return chase;
}
- oggpack_adv(b,read);
+ oggpack_adv(b,read+1);
return(-1);
}
diff --git a/floor1.c b/floor1.c
index 4f53bf7..44091f5 100644
--- a/floor1.c
+++ b/floor1.c
@@ -105,10 +105,9 @@ vorbis_info_floor *floor1_info_unpack (vorbis_info *vi,oggpack_buffer *opb){
info->class[j].class_dim=oggpack_read(opb,3)+1; /* 1 to 8 */
info->class[j].class_subs=oggpack_read(opb,2); /* 0,1,2,3 bits */
if(oggpack_eop(opb)<0) goto err_out;
- if(info->class[j].class_subs){
+ if(info->class[j].class_subs)
info->class[j].class_book=oggpack_read(opb,8);
- if(info->class[j].class_book>=ci->books)goto err_out;
- }else
+ else
info->class[j].class_book=0;
if(info->class[j].class_book>=ci->books)goto err_out;
for(k=0;k<(1<<info->class[j].class_subs);k++){
diff --git a/misc.c b/misc.c
index fbfe8e7..66bf523 100644
--- a/misc.c
+++ b/misc.c
@@ -10,7 +10,7 @@
* *
********************************************************************/
-#define HEAD_ALIGN 32
+#define HEAD_ALIGN 64
#include <stdlib.h>
#include <string.h>
#include <stdio.h>