From 97ffd1f8ae167a4c7ccec39a6a03c33537cbfdcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Sun, 3 May 2020 02:22:33 +0200 Subject: [PATCH] Fix crash in stb_vorbis.c (cherry picked from commit d259094c3aba09644e0ef8c58388d5377d7b5982) --- thirdparty/README.md | 1 + thirdparty/misc/stb_vorbis.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/thirdparty/README.md b/thirdparty/README.md index 093f63019eb..27d5267629b 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -378,6 +378,7 @@ Collection of single-file libraries used in Godot components. * Upstream: https://github.com/nothings/stb * Version: 1.19 * License: Public Domain (Unlicense) or MIT + * Modifications: `f->temp_offset += (sz+3)&~3;` changed to `f->temp_offset += (sz+7)&~7;` (needed until fixed upstream) ## nanosvg diff --git a/thirdparty/misc/stb_vorbis.c b/thirdparty/misc/stb_vorbis.c index b28944a4d97..b0d79b1724f 100644 --- a/thirdparty/misc/stb_vorbis.c +++ b/thirdparty/misc/stb_vorbis.c @@ -961,7 +961,7 @@ static void *setup_temp_malloc(vorb *f, int sz) static void setup_temp_free(vorb *f, void *p, int sz) { if (f->alloc.alloc_buffer) { - f->temp_offset += (sz+3)&~3; + f->temp_offset += (sz+7)&~7; return; } free(p);