Commit Graph

2130 Commits

Author SHA1 Message Date
Fabian Giesen
a3f2897b85 stb_image: Fix bug on JPEGs with malformed DC deltas
extend_receive implicitly requires n <= 15 (code length);
the maximum that actually makes sense for 8-bit baseline JPEG is
11, but 15 is the natural limit for us because the AC coding path
stores the number of magnitude bits in a nibble.

Check that DC delta bits are in range before attempting to call
extend_receive.

Fixes issue #1108.
2021-07-02 18:10:49 -07:00
Fabian Giesen
50072f6658 stb_image: Check results of all mallocs.
A few were missing. Make sure to always report ouf-of-memory
errors.

Fixes issue #1056.
2021-07-02 17:52:29 -07:00
Sean Barrett
8e51be04dc Merge branch 'master' of https://github.com/nothings/stb 2021-07-02 06:57:02 -07:00
Sean Barrett
52ad6bd4c9 update stb_vorbis version 2021-07-02 06:56:34 -07:00
Sean Barrett
99e905e50b Merge branch 'pull_req' of https://github.com/anthofoxo/stb into working 2021-07-02 06:49:03 -07:00
Fabian Giesen
67b247ba49 README: updated supported stb_image and stb_image_write formats 2021-07-01 17:49:11 -07:00
Fabian Giesen
b4891baa6c stb_image: Update credits, change log 2021-07-01 17:35:40 -07:00
Simon Breuss
8befa752b0 Adds 16-bit support for pnm files. 2021-07-01 17:33:58 -07:00
Jacko Dirks
655b2b1f06 stb_image.h: Suppress warnings about out_size, delay_size
These two variables are unused on some targets, resulting in
warnings. Add STBI_NOTUSED around them to suppress those
warnings.
2021-07-01 17:24:12 -07:00
Fabian Giesen
3a7dcdd269 stb_image: Better docs for stbi_info.
Fixes #1026.
2021-07-01 17:18:51 -07:00
Fabian Giesen
bc4e96b5a7 stb_image: Fix issue #994.
Accidentally introduced during a merge.
2021-07-01 17:11:25 -07:00
Fabian Giesen
1cacac09ed stb_textedit: Docs fix.
Fixes issue #1041.
2021-07-01 17:08:20 -07:00
Fabian Giesen
309322ae4a stb_truetype: Turn codepoint assert into error check
Fixes the bug covered by PR #1066, but with a slightly different
fix that's hopefully a bit clearer.
2021-07-01 17:03:51 -07:00
Doj
0755e6a76f stb_sprintf: fix stbsp_ddtoS64 macro
Should use xh argument not ph (which is the name of the
variable that it actually gets instantiated with the
one time it is used).
2021-07-01 16:57:18 -07:00
Jan CW Kroeze
6931571861 Note GL blend state for stb_truetype 2021-07-01 16:54:06 -07:00
Rafael Sachetto
0cc6060b77 Fix compilation warnings in the s390x architeture. Fixes #1082. 2021-07-01 16:51:53 -07:00
Valentin Lenhart
073114d111 stb_sprintf.h: stdlib.h is not needed
va_arg() is in stdarg.h, which is already being included
2021-07-01 16:48:00 -07:00
Fabian Giesen
9a9c937f68 stb_dxt: Remove dithering support.
Keep STB_DXT_DITHER so as not to break existing code that tries
to enable it, but just leave it permanently off. I originally
introduced it somewhat superstitiously because of the RGB565
endpoint resolution but it never improved either perceptual quality
or objective quality metrics, and the code is appreciably simpler
without it.
2021-07-01 16:37:35 -07:00
Fabian Giesen
425c4d8b31 stb_dxt: Better error calc for single-color table
Don't truncate error as aggressively; easily done, but wanted
to keep it separate from the previous change.
2021-07-01 16:24:09 -07:00
Alan Hickman
d84beeeff3 stb_dxt: Initialize tables at compile time
Also fix a "potentially uninitialized variable" warning.

This is a modified version of Alan's original PR that keeps the
table generator in the file (in case there's interest) and also
replaces the expand[] tables with math, since it's trivial.

Fixes issue #1117.
2021-07-01 16:19:17 -07:00
Michael Aganier
40d7e47896 stb_sprintf: add attribute format to variadic functions
This allows for compiler verification of the format string
just like printf.
2021-07-01 15:39:42 -07:00
Fabian Giesen
05e1efab3d Move stb.h to deprecated.
It was never designed to be used by anyone but Sean and has
numerous problems; new code should definitely not be using
this.
2021-07-01 15:29:17 -07:00
Sean Barrett
80c8f6af03
Update why_public_domain.md 2021-06-20 05:42:03 -07:00
Sean Barrett
ea2f937a01 increment stb_ds version, update README 2021-06-04 11:42:16 -07:00
Sean Barrett
0188581ff0 Merge branch 'stbds_custom_free_fix' of https://github.com/avennstrom/stb into foo 2021-06-04 11:38:01 -07:00
Sean Barrett
6b647c0257 Merge branch 'working' 2021-06-04 11:18:16 -07:00
Sean Barrett
781609b7e9 stb_ds: fix arrisn, shgetp_null 2021-06-04 11:02:23 -07:00
Macoy Madson
e97a95c0c1 Added Macoy Madson to contributors 2021-05-31 19:53:09 -07:00
Macoy Madson
63e4ada98c Fix temp_key being stale on key re-insert
See issue #992 and pull request #993.
2021-05-31 19:51:39 -07:00
Andreas Vennström
579ace225f fix indentation 2021-05-11 22:56:27 +02:00
Andreas Vennström
fcd86e8f57 credits 2021-05-11 22:50:11 +02:00
Andreas Vennström
89762b9934 Fix stb_ds custom allocator 2021-05-11 22:44:08 +02:00
AnthoFoxo
b7b2aaa587 fixed vorbis comments causing outofmem 2021-04-13 09:43:41 -04:00
Sean Barrett
c9064e3176 stb_hexwave tweak comment 2021-04-01 10:31:43 -07:00
Sean Barrett
997d3c421e stb_hexwave: add full license text 2021-04-01 10:27:54 -07:00
Sean Barrett
559d759c2c stb_hexwave added, stretchy_buffer.h deprecated 2021-04-01 01:53:09 -07:00
t-mw
2d82cd1a2c
Rename arraddnoff -> arraddnindex
Fixes #1011.
As intended according to https://github.com/nothings/stb/pull/932#issuecomment-657524197.
2021-03-02 13:53:31 +01:00
AnthoFoxo
4882970b1c vorbis comment list setup_malloc call is guarded 2021-01-25 20:01:42 -05:00
AnthoFoxo
b038c11bd5 updated contributor list 2020-12-16 18:25:11 -05:00
AnthoFoxo
f0f2533754 closes #1063; Fixed files with no comments emitting outofmemory errors 2020-12-16 18:19:03 -05:00
Sean Barrett
b42009b3b9 fix readme linebreaks 2020-07-13 04:46:06 -07:00
Sean Barrett
e140649ccf remove trailign whitespace 2020-07-13 04:40:31 -07:00
Sean Barrett
314d0a6f9a update version numbers 2020-07-13 04:36:03 -07:00
Sean Barrett
59f06c1a97 stb_ds: move temp_key added by PR into hash_table structure instead of main header struct 2020-07-13 04:25:34 -07:00
Sean Barrett
ef23148510 Merge branch 'master' of https://github.com/srdjanstipic/stb into working 2020-07-13 04:16:38 -07:00
Sean Barrett
580fc1ab9b Merge branch 'stb_vorbis-fix-comment-read-oom' of https://github.com/akien-mga/stb into working 2020-07-13 04:15:48 -07:00
Sean Barrett
db2acff8b1 stb_vorbis: fix bug in computing end of temp alloc buffer if it's not a multiple of 8 2020-07-13 04:12:21 -07:00
Sean Barrett
3152efaa97 Merge branch 'fuzzer_updates' of https://github.com/randy408/stb into working 2020-07-13 04:08:36 -07:00
Sean Barrett
f3085776a4 Merge branch 'patch-1' of https://github.com/coltongit/stb into working 2020-07-13 04:07:16 -07:00
Sean Barrett
589a678b65 Merge branch 'master' of https://github.com/recp/stb into working 2020-07-13 04:06:19 -07:00