Skip to content

Commit

Permalink
Handle crashes where we read past the end of a buffer to align data for
Browse files Browse the repository at this point in the history
 vector routines.
  • Loading branch information
icculus committed May 7, 2006
1 parent d6f9c5a commit d15809d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions osx/AL_EXT_vorbis/libvorbis-1.0-optimized/lib/block.c
Expand Up @@ -101,6 +101,7 @@ int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){
}

void *_vorbis_block_alloc(vorbis_block *vb,long bytes){
bytes += 16; /* overallocate for vectorization routines. */
bytes=(bytes+(WORD_ALIGN-1)) & ~(WORD_ALIGN-1);
if(bytes+vb->localtop>vb->localalloc){
/* can't just _ogg_realloc... there are outstanding pointers */
Expand Down

0 comments on commit d15809d

Please sign in to comment.