Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename stretchy_buffer.h to stb_stretchy_buffer.h #1

Closed
wants to merge 1 commit into from
Closed

Rename stretchy_buffer.h to stb_stretchy_buffer.h #1

wants to merge 1 commit into from

Conversation

dmmfix
Copy link

@dmmfix dmmfix commented Jun 1, 2014

We shall settle this in modern fashion!

@nothings nothings closed this Jun 1, 2014
nothings pushed a commit that referenced this pull request Sep 7, 2014
nothings pushed a commit that referenced this pull request Feb 7, 2019
GerHobbelt pushed a commit to GerHobbelt/stb that referenced this pull request Mar 21, 2024
Merge from nothings/master now issue 169 is fixed
GerHobbelt pushed a commit to GerHobbelt/stb that referenced this pull request Mar 21, 2024
…using different terminology -- one correctly deallocated temp memory, while the other added more deallocations in error cases. The fix is to merge the terminology of one with the new lines of code in the other.
GerHobbelt pushed a commit to GerHobbelt/stb that referenced this pull request Mar 21, 2024
…arious issues that came up in the tests; the worst is probably an out-of-bounds write when stb_sprintf's second argument is 0. (See issue nothings#1).

Details:

deprecated/stb.h:
* Fix crash when computing perfect hashes over a table of size 1, due to stb_log2_floor returning -1 for an input of 1 when it should only return -1 for an input of 0.
* Fix undefined behavior in call to strcpy_s: The size term must be the size of the destination buffer; if it's too large, it's UB (and crashes MSVC, which assumes it can copy in chunks that large).

stb_sprintf.h:
* Add STBSP__ASAN definition
* Fix OOB write in the case where `count == 0`.

tests/grid_reachability.c:
* Fix printf specifier: %d -> %zu for size_t

tests/stb.c:
* Fix printf specifier: %d -> %zu for size_t
* Turn off code using STUA, as this does not appear to be present in current versions of stb.
* Change from `__asm int 3;` to `__debugbreak()`, as the former syntax is not supported in VS 2022.

test/test_ds.c:
* Fix segfault: the issue was that in `arrins(temp, arrlen(temp), 'b')`, `arrins` is a macro, so `arrlen(temp)` gets inserted into multiple places; as a result, one part of the expanded macro used a size of 1 and the other used a size of 2, leading to a write at a bad index.

test/test_sprintf.c:
* Fix header for ssize_t on Windows

tests/test_vorbis.c:
* Look for sketch008.ogg in a local directory rather than hardcoding the path to it.
GerHobbelt pushed a commit to GerHobbelt/stb that referenced this pull request Mar 21, 2024
…). Mitigate resource exhaustion attack by checking size against length of stream.
@ryanrsrs ryanrsrs mentioned this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants