[xiph-cvs] cvs commit: vorbis/lib envelope.c
Michael Smith
msmith at xiph.org
Thu Jul 4 03:07:04 PDT 2002
msmith 02/07/04 03:07:04
Modified: lib envelope.c
Log:
Fix overrun of a buffer resulting in a crash on some input files.
Revision Changes Path
1.50 +2 -2 vorbis/lib/envelope.c
Index: envelope.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/envelope.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- envelope.c 2002/04/06 03:07:25 1.49
+++ envelope.c 2002/07/04 10:07:02 1.50
@@ -11,7 +11,7 @@
********************************************************************
function: PCM data envelope analysis
- last mod: $Id: envelope.c,v 1.49 2002/04/06 03:07:25 xiphmont Exp $
+ last mod: $Id: envelope.c,v 1.50 2002/07/04 10:07:02 msmith Exp $
********************************************************************/
@@ -226,7 +226,7 @@
if(first<0)first=0;
/* make sure we have enough storage to match the PCM */
- if(last>ve->storage){
+ if(last+VE_WIN+VE_POST>ve->storage){
ve->storage=last+VE_WIN+VE_POST; /* be sure */
ve->mark=_ogg_realloc(ve->mark,ve->storage*sizeof(*ve->mark));
}
<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