stb icon indicating copy to clipboard operation
stb copied to clipboard

stb single-file public domain libraries for C/C++

Results 244 stb issues
Sort by recently updated
recently updated
newest added

A crafted file may trigger out of bounds write in [`f->vendor[len] = (char)'\0';`](https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3658) [1]. The root cause is that if [`len` read in `start_decoder`](https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_vorbis.c#L3652-L3658) [2] is `-1` and `len +...

When `stbir__1_coeff_remnant` and `stbir__store_output` are expanded the following happens: `stbir__simdf8_madd_mem4( tot0, tot0, t, );` will corrupt upper 128 bits of `tot0` because of `_mm256_castps128_ps256` `stbir__simdf8_add4halves( t, t, tot0 );` will...

**Describe the bug** Modifiers 'j' and 'z' do not work properly on some architecture, because the arguments have a size different from that inferred by the library, which results in...

2 bug
1 stb_sprintf

`stbi__malloc` in [`stbi__convert_8_to_16`](https://github.com/nothings/stb/blob/5736b15f7ea0ffb08dd38af21067c314d6a3aae9/stb_image.h#L1204-L1218) [1] may overflow. However for successful exploitation `img_len` must be bigger than zero [2]. Any big enough `img_len` multiplied by 2 and casted to `size_t` on a...

1 stb_image

When compiling for AVX and AVX2 code expands to ` // stbir__4_coeff_start stbir__simdf8 tot0,c,cs; \ STBIR_SIMD_NO_UNROLL(decode); \ stbir__simdf8_load4b( cs, hc ); \ stbir__simdf8_0123to00112233( c, cs ); \ stbir__simdf8_mult_mem( tot0, c,...

- stb_dxt.h error: required for 'memcpy' - stb_herringbone_wang_tile.h warnings: Use separate declaration and definition of struct to suppress warnings

Thread sanitizer reports numerous data races, mostly when assigning the `info` struct inside `stbir__update_info_from_resize`. I'm also seeing visual corruption when running resizing on multiple threads. My guess would be torn...

**Is your feature request related to a problem? Please describe.** When stb_image loads `.gif` files, it creates a buffer for the entire file. This can get troublesome for big files,...

4 enhancement

The #if defined(STBI_NO_PNG) &&defined (STBI_NO_PSD) in your question can be changed to #if defined(STBI_NO_PNG) &&defined (STBI_NO_PSD) &&! defined(STBI_NO_PNM)