[xiph-cvs] cvs commit: vorbis/lib sharedbook.c
Monty
xiphmont at xiph.org
Fri Jan 18 21:01:44 PST 2002
xiphmont 02/01/18 21:01:44
Modified: lib sharedbook.c
Log:
Fix to segfault unpacking a sparse book
Revision Changes Path
1.24 +7 -4 vorbis/lib/sharedbook.c
Index: sharedbook.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/sharedbook.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- sharedbook.c 2002/01/19 04:52:40 1.23
+++ sharedbook.c 2002/01/19 05:01:44 1.24
@@ -11,7 +11,7 @@
********************************************************************
function: basic shared codebook operations
- last mod: $Id: sharedbook.c,v 1.23 2002/01/19 04:52:40 xiphmont Exp $
+ last mod: $Id: sharedbook.c,v 1.24 2002/01/19 05:01:44 xiphmont Exp $
********************************************************************/
@@ -132,9 +132,12 @@
temp<<=1;
temp|=(r[count]>>j)&1;
}
- r[count]=temp;
- if(l[i] || sparsecount==0)
- count++;
+
+ if(sparsecount){
+ if(l[i])
+ r[count++]=temp;
+ }else
+ r[count++]=temp;
}
return(r);
<p><p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list