Skip to content
Myr

Merge branch 'issue-799' of https://github.com/pwaller/stb into work2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents a6726a3, 2f18c96 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:stb_vorbis.c+3 added-3 removed
28 unmodified lines
29// Bernhard Wodo Evan Balster alxprd@github30// Tom Beaumont Ingo Leitgeb Nicolas Guillemot31// Phillip Bennefall Rohit Thiago Goulart32// manxorist@github saga musix github:infatum33// Timur Gagiev Maxwell Koo33// Timur Gagiev Maxwell Koo Peter Waller34//35// Partial history:36// 1.17 - 2019-07-08 - fix CVE-2019-13217..CVE-2019-13223 (by ForAllSecure)37// 1.16 - 2019-03-04 - fix warnings
873 unmodified lines
911}912913static void *setup_malloc(vorb *f, int sz)914{915 sz = (sz+3) & ~3;915 sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs.916 f->setup_memory_required += sz;917 if (f->alloc.alloc_buffer) {918 void *p = (char *) f->alloc.alloc_buffer + f->setup_offset;919 if (f->setup_offset + sz > f->temp_offset) return NULL;
10 unmodified lines
930}931932static void *setup_temp_malloc(vorb *f, int sz)933{934 sz = (sz+3) & ~3;934 sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs.935 if (f->alloc.alloc_buffer) {936 if (f->temp_offset - sz < f->setup_offset) return NULL;937 f->temp_offset -= sz;938 return (char *) f->alloc.alloc_buffer + f->temp_offset;
4538 unmodified lines