Commit Graph

1130 Commits

Author SHA1 Message Date
Jörn Heusipp
0985e89335 stb_vorbis: Fix memory leak in decode_residue() and inverse_mdct() when redefining temp_alloc() and temp_free()
temp_alloc() and temp_free() are documented as customization points in section "MEMORY ALLOCATION" (stb_vorbis.c:81).
However, in decode_residue() and inverse_mdct() (via temp_block_array() and temp_alloc() respectively), stb_vorbis allocates temporary memory but does not call temp_free() when finished. It does call temp_alloc_restore() though, but there is no sane way to provide an implementation thereof when using a malloc()/free()-like allocation backend.

Adding calls to temp_free() before the respective calls to temp_alloc_restore() is safe, because in case of a non-empty temp_alloc_restore() implementation, temp_free() would simply be implemented empty (the current implementation of temp_*() is fine in this regard). That way, all possible temporary memory allocation schemes (i.e. alloca(), custom provided alloc_buffer, malloc()) are handled properly.

Add the appropriate temp_free() calls.
2016-03-17 09:23:45 +01:00
Matthew Gregan
94f2ceac15 Fix typo in stbi__parse_uncompressed_block 2016-03-12 01:55:59 +13:00
Sergey Kosarevsky
46b64eb878 Added PoissonGenerator.h 2016-03-10 19:49:38 +01:00
Sean Barrett
8aa9afb30e typo 2016-03-07 20:44:59 -08:00
Sean Barrett
b9bc6148d4 linalg.h 2016-03-07 20:44:29 -08:00
Thatcher Ulrich
7e1ee2d386 Allocate large structure using malloc instead of stack. 2016-03-02 15:56:53 -05:00
Thatcher Ulrich
291ad22e84 Replace large stack allocations with dynamic allocations. 2016-03-02 15:31:07 -05:00
Thiago Goulart
5a00ce39eb Fix a few warnings when building std_vorbis using Xcode 7.2.1 2016-03-02 00:50:40 -08:00
Craig Donner
20f2eec024 Update license with a few more tweaks and better English grammar. 2016-02-25 13:05:11 -08:00
Craig Donner
ee6978cb68 Slightly modify the public domain license to keep it in the public domain, but make it clear that even when dedications might not be recognized that the code is still usable. Given that this isn't dual-licensing under a different license, I'm hoping this will be acceptable. 2016-02-25 12:55:44 -08:00
Sean Barrett
a83ab31335 Merge pull request #248 from ReadmeCritic/patch-1
Update links for par_shapes, fastlz
2016-02-22 14:07:57 -08:00
ReadmeCritic
c0774cc7eb Update links for par_shapes, fastlz 2016-02-22 08:50:47 -08:00
Sean Barrett
a4c0a5e882 Update other_libs.md 2016-02-22 06:26:21 -08:00
Sean Barrett
32b19a6c8b Update other_libs.md 2016-02-20 02:15:04 -08:00
Craig Donner
49b65c0873 Slightly modify the public domain license to keep it in the public domain, but make it clear that even when dedications might not be recognized that the code is still usable. Given that this isn't dual-licensing under a different license, I'm hoping this will be acceptable. 2016-02-10 14:48:59 -08:00
Jorge Rodriguez
5e2d0fd777 Add support for obtaining the entire kerning table from a font all at once, for use in rendering packed textures offline. 2016-02-09 19:40:18 -08:00
Jorge Rodriguez
ff862a2a46 Merge https://github.com/nothings/stb 2016-02-09 19:37:07 -08:00
Sean Barrett
955dfe991b Merge pull request #238 from dbohdan/master
other_libs.md: Update Picol
2016-01-28 13:07:09 -08:00
Danyil Bohdan
d35dbc4368 other_libs.md: Update Picol 2016-01-28 16:42:13 +02:00
Sean Barrett
a78bc165b9 Update other_libs.md 2016-01-26 12:29:13 -08:00
Sean Barrett
124669a8f5 Update other_libs.md 2016-01-26 12:28:23 -08:00
Sean Barrett
6fb2270617 Update other_libs.md 2016-01-26 12:27:51 -08:00
Sean Barrett
1d95d24ae9 Update other_libs.md 2016-01-26 12:26:47 -08:00
Sean Barrett
b8a9e19f86 Update other_libs.md 2016-01-26 12:23:45 -08:00
Sean Barrett
a1169d90d0 Update other_libs.md 2016-01-26 12:22:16 -08:00
Sean Barrett
6e556fe757 Update other_libs.md 2016-01-26 12:08:20 -08:00
Sean Barrett
c63e608497 Update other_libs.md 2016-01-26 11:42:11 -08:00
Sean Barrett
b9504633b9 Update other_libs.md 2016-01-26 10:23:34 -08:00
Sean Barrett
ccfca5a5da Update other_libs.md 2016-01-26 08:45:05 -08:00
Sean Barrett
547c951091 Update other_libs.md 2016-01-26 08:43:34 -08:00
Sean Barrett
f4a878dbf9 Update other_libs.md 2016-01-26 08:40:04 -08:00
Sean Barrett
49f971110f Update other_libs.md 2016-01-26 08:39:30 -08:00
Sean Barrett
a4a27ea3cd Update other_libs.md 2016-01-26 08:36:59 -08:00
Sean Barrett
47796836b6 Update other_libs.md 2016-01-26 08:02:05 -08:00
Sean Barrett
229ebfa4ff Update other_libs.md 2016-01-26 07:15:03 -08:00
Sean Barrett
78befd33e9 Update other_libs.md 2016-01-26 06:57:37 -08:00
Sean Barrett
4dd8cf9ae8 Update other_libs.md 2016-01-26 06:25:38 -08:00
Sean Barrett
7a889d272a Update other_libs.md 2016-01-26 06:16:48 -08:00
Sean Barrett
420c68ac83 Update other_libs.md 2016-01-26 06:07:23 -08:00
Sean Barrett
983630e7b0 Update other_libs.md 2016-01-26 05:59:25 -08:00
Sean Barrett
bb7355f4b1 Update other_libs.md 2016-01-26 05:50:38 -08:00
Sean Barrett
e1bc6029b9 Update other_libs.md 2016-01-26 05:48:34 -08:00
Sean Barrett
cbbd2d053f Update other_libs.md 2016-01-26 05:47:02 -08:00
Sean Barrett
94106a8fdd Update other_libs.md 2016-01-26 05:38:05 -08:00
Sean Barrett
91402d1a0d Update other_libs.md 2016-01-26 05:36:11 -08:00
Sean Barrett
fc5009027d Update other_libs.md 2016-01-26 05:31:12 -08:00
Sean Barrett
1de2492002 Update other_libs.md 2016-01-23 23:44:21 -08:00
Sean Barrett
b0b3c2633d Update other_libs.md 2016-01-23 14:39:54 -08:00
Sean Barrett
0e76e2ca84 Merge pull request #235 from dbohdan/master
other_libs.md: Add Picol
2016-01-23 14:38:29 -08:00
Danyil Bohdan
02b90e8fb5 other_libs.md: Add Picol 2016-01-23 23:13:31 +02:00