Commit Graph

1704 Commits

Author SHA1 Message Date
Sean Barrett 98fdfc6df8 Fix seven bugs discovered and fixed by ForAllSecure:
CVE-2019-13217: heap buffer overflow in start_decoder()
CVE-2019-13218: stack buffer overflow in compute_codewords()
CVE-2019-13219: uninitialized memory in vorbis_decode_packet_rest()
CVE-2019-13220: out-of-range read in draw_line()
CVE-2019-13221: issue with large 1D codebooks in lookup1_values()
CVE-2019-13222: unchecked NULL returned by get_window()
CVE-2019-13223: division by zero in predict_point()
2019-08-09 04:05:22 -07:00
Sean Barrett c72a95d766 update README 2019-06-17 05:44:12 -07:00
Sean Barrett 9f1836f0b1 update version 2019-06-17 05:43:52 -07:00
Sean Barrett f9910f1f9a Merge branch 'hmlen-null' of https://github.com/phoekz/stb into working 2019-06-17 05:26:21 -07:00
Sean Barrett 8f0bade4ae tweak STBDS_REALLOC/STBDS_FREE change 2019-06-17 05:25:44 -07:00
Sean Barrett 258c6e1f50 Merge branch 'use-free' of https://github.com/adurdin/stb into working 2019-06-17 05:17:36 -07:00
Sean Barrett eddae8cc98 Merge branch 'master' into working 2019-06-17 05:15:18 -07:00
Vinh Truong fad8903fe8 Credits 2019-06-01 12:08:59 +03:00
Vinh Truong 96021689c8 hmlen and hmlenu now returns 0 on NULL pointer 2019-06-01 12:07:19 +03:00
Andy Durdin 2cddbc934d stb_ds: STBDS_REALLOC and STBDS_FREE only need to be defined for the implementation. 2019-05-27 11:14:17 +02:00
Andy Durdin 6b2fb7702f stb_ds: Allow STBDS_REALLOC and STBDS_FREE defines to customize memory management. 2019-05-27 11:07:30 +02:00
Andy Durdin 5a2a8e882f stb_ds: Use free() instead of realloc(x,0). Fixes #768 2019-05-27 11:04:28 +02:00
Sean Barrett 1034f5e5c4 add stb_include.h 2019-05-04 08:19:18 -07:00
Sean Barrett 7638200f0b Remove old documentation re: SECURE_CRT 2019-03-04 23:22:06 -08:00
Sean Barrett 2c2908f505 update version numbers 2019-03-04 15:08:53 -08:00
Sean Barrett d940053a01 Merge branch 'master' into working 2019-03-04 14:56:00 -08:00
Sean Barrett 8cf9f5adb4 Merge branch 'master' of https://github.com/rsachetto/stb into working 2019-03-04 14:52:49 -08:00
Sean Barrett 1737c342e2 Merge branch 'fix_issue-656' of https://github.com/rygorous/stb into working 2019-03-04 14:52:20 -08:00
Sean Barrett 3b5ffbe31c Merge branch 'fix_issue-608' of https://github.com/rygorous/stb into working 2019-03-04 14:51:34 -08:00
Sean Barrett a0b521fcf2 no warnings when compiling /W3
compiling all test cases and compilers in test.sbm
   Compilers:
     32-bit:
       VS2015
       VS2013
       VS2008
       VC6 (1998)
       clang-cl 9.0.1
     64-bit
       VS2015
       clang-cl 9.0.1
2019-03-04 14:45:06 -08:00
Sean Barrett 96b4748d57 update test_ds.c 2019-03-03 21:40:18 -08:00
Sean Barrett 30496e22d7 add new test files 2019-03-03 21:39:46 -08:00
Sean Barrett b8960f32b8 stb_ds: major string hash fix, minor other changes
- arena and strdup string hashes were badly broken due to not setting up default slot correctly
  - tweak use of seed in 4-byte and 8-byte hash functions to hopefully be slightly stronger
  - a few internal #ifdefs for performance tuning
2019-03-03 21:36:15 -08:00
kroko a2cd79b8ff fix comma warnings when building with -Wcomma 2019-03-03 18:48:32 +02:00
Fabian Giesen d6a598186c stb_image: Pacify some MSVC warnings.
Convince the compiler's dataflow analysis that yes, we are not
reading uninitialized values of coutput.

Fixes issue #608.
2019-03-01 19:57:12 -08:00
Fabian Giesen 6570d6a825 stb_image: Make GIF reader validate image size.
I must've missed it when I did this for the other image loaders.
Either way, combined with the previous checkin, this should fix
issue #614 properly.

Fixes issue #614.
2019-03-01 19:47:59 -08:00
Fabian Giesen 50b1bfba58 stb_image: Fix multiple bugs in GIF decoder.
1. Check not just g->out allocation for failure.
2. If an image descriptor specified a 0-width image, this could be
   used to produce an out-of-bounds write.
3. Fix memory leak in case an error occurs during decoding.

Fixes issue #656.
2019-03-01 19:22:44 -08:00
Rafael Sachetto caf9608826 Adding arrpop macro to stb_ds.h 2019-03-01 14:04:31 -03:00
Rafael Sachetto 89bccdd567 Small documentation correction 2019-02-26 09:37:16 -03:00
Sean Barrett 72990efc3e test updates for test_ds unit testing 2019-02-25 13:49:37 -08:00
Sean Barrett f9133c3677 stb_ds v0.3: fixes for compiling client code in C++
add missing _wrapper suffixes
   disable clang rvalue support in C++
   disable unit tests in VC6 C++
   other tweaks
2019-02-25 13:48:41 -08:00
Sean Barrett 39c05598a9 Update stb.h version number 2019-02-25 12:05:38 -08:00
Sean Barrett 0f9254357c update version numbers 2019-02-25 11:49:12 -08:00
Sean Barrett c963e40972 update version numbers 2019-02-25 11:48:42 -08:00
Sean Barrett a4111af960 update readme 2019-02-25 11:41:58 -08:00
Sean Barrett 1aeb8ec201 stb_ds: fix shift warnings in later VS compilers 2019-02-25 11:40:33 -08:00
Sean Barrett e704ed0efb update tests and project files for stb_ds 2019-02-25 11:17:27 -08:00
Sean Barrett 477471d9a8 add stb_ds.h and tests 2019-02-25 11:16:35 -08:00
Sean Barrett aeec66c6ec Merge branch 'randlong' of https://github.com/flibitijibibo/stb into working 2019-02-25 11:13:03 -08:00
Sean Barrett 9d8a9e7f16 Merge branch 'fix_issue-701' of https://github.com/rygorous/stb into working 2019-02-25 11:11:37 -08:00
Sean Barrett 742056dee9 Merge branch 'fix_issue-705' of https://github.com/rygorous/stb into working 2019-02-25 11:11:14 -08:00
Sean Barrett 5fe7fb52f2 various fixes for clang
also fix a comment typo
2019-02-25 11:10:54 -08:00
Sean Barrett 5715e6faaf Makefile: update how to build image_write_test 2019-02-24 04:37:37 -08:00
Sean Barrett 2ce93bf1d8 Merge branch 'fix_issue-707' of https://github.com/rygorous/stb into working 2019-02-24 04:27:18 -08:00
Sean Barrett 57c7029166 test_image_write.c: change from standalone to integrated with image_test.c 2019-02-24 04:22:47 -08:00
Fabian Giesen ae431d75e0 stb_rect_pack: Fix two bugs.
stbrp__skyline_find_best_pos didn't correctly handle rects too
large to ever fit inside the context. Since that function also
pads the width up to a multiple of the alignment, it makes the
most sense to do that check right after (but before entering
the main packing loop).

While we're here, also fix an off-by-1 bug in the best-fit
heuristic where it didn't want to use the last row in
certain cases.

Fixes issue #701.
2019-02-23 05:48:11 -08:00
Fabian Giesen af43e6b006 stb_truetype: Fix warning in comment.
Replace ASCII art with slightly crappier ASCII art that is not
going to make compilers complain about trailing backslashes.

Fixes issue #707.
2019-02-23 05:33:20 -08:00
Fabian Giesen bbbdc1e811 stb_image: Fix typo in comment.
Fixes issue #705.
2019-02-23 05:25:47 -08:00
Fabian Giesen e0ee0de26c tests: Add simple image_write_test smoke test 2019-02-23 05:18:14 -08:00
Fabian Giesen 980add9725 stb_image_write: Fix JPEG writer bug. 2019-02-23 05:17:37 -08:00