From db2acff8b178b413bbc8294b7d1f62ac4dae30a7 Mon Sep 17 00:00:00 2001 From: Sean Barrett Date: Mon, 13 Jul 2020 04:12:21 -0700 Subject: [PATCH] stb_vorbis: fix bug in computing end of temp alloc buffer if it's not a multiple of 8 --- stb_vorbis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_vorbis.c b/stb_vorbis.c index 33d8f56..8b46282 100644 --- a/stb_vorbis.c +++ b/stb_vorbis.c @@ -4257,7 +4257,7 @@ static void vorbis_init(stb_vorbis *p, const stb_vorbis_alloc *z) memset(p, 0, sizeof(*p)); // NULL out all malloc'd pointers to start if (z) { p->alloc = *z; - p->alloc.alloc_buffer_length_in_bytes = (p->alloc.alloc_buffer_length_in_bytes+3) & ~3; + p->alloc.alloc_buffer_length_in_bytes &= ~7; p->temp_offset = p->alloc.alloc_buffer_length_in_bytes; } p->eof = 0;