Skip to content

Commit c1b3d5c

Browse files
committed
stb_vorbis: revise CVE-2023-45676 / CVE-2023-45677 fix.
c.f.: nothings/stb#1248.
1 parent 24bd73e commit c1b3d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/codecs/stb_vorbis/stb_vorbis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ static void *make_block_array(void *mem, int count, int size)
986986

987987
static void *setup_malloc(vorb *f, int sz)
988988
{
989-
if (sz < 0 || INT_MAX - 7 < sz) return NULL;
989+
if (sz <= 0 || INT_MAX - 7 < sz) return NULL;
990990
sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs.
991991
f->setup_memory_required += sz;
992992
if (f->alloc.alloc_buffer) {

0 commit comments

Comments
 (0)