浏览代码

Merge pull request #38422 from RandomShaper/fix_stb_vorbis

Fix crash in stb_vorbis.c
Rémi Verschelde 5 年之前
父节点
当前提交
a928a10e83
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      thirdparty/README.md
  2. 1 1
      thirdparty/misc/stb_vorbis.c

+ 1 - 0
thirdparty/README.md

@@ -422,6 +422,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

+ 1 - 1
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);