Comments (7)
I've seen this as well. I usually have Visual Studio disable that runtime check for that file, just because I don't understand the source well enough to fix the issue.
from stb.
I disabled the check and the texture ends up appearing corrupted in GPU memory. Maybe I'm doing something wrong?
from stb.
Probably the unpack alignment ( the textures load just fine here with stbi ).
Set the unpack alignment to 1: glPixelStorei(GL_UNPACK_ALIGNMENT,1);
from stb.
Never mind, just me being stupid. Was not assigning the uniform correctly.
from stb.
run-time check is worth fixing
from stb.
Attempted to fix every issue like this which was found in a cast that turned up with a search for "= (" or "(stbi_uc)". (Note that those searches may not have found every such cast.)
I can't actually test that the fixes work since I'm not building with the version of MSVC that has these warnings, but the fix is straightforward so I expect it to be right. However, since these warnings only turn up when you execute them, if there are more places with the same issue that didn't turn up in my searches, we'll just have to discover them piecemeal.
Pushed and released as version 1.38
from stb.
Can confirm, the issue was resolved in Visual Studio 2012. If I run into anything else I'll let you know. Thank you!
from stb.
Related Issues (20)
- Integer overflow in `stbi__convert_8_to_16` HOT 1
- Integer overflow in `stbi__load_gif_main`
- Integer overflow in `stbi__jpeg_decode_block`
- Use of uninitialized value in `stbi__jpeg_decode_block_prog_ac`
- Signed integer overflow in `start_decoder`
- Signed integer overflow in `convert_channels_short_interleaved`
- Wild address read in stbi__gif_load_next (`GHSL-2023-145/CVE-2023-45661`)
- Multi-byte read heap buffer overflow in `stbi__vertical_flip` (`GHSL-2023-146/CVE-2023-45662`)
- Disclosure of uninitialized memory in `stbi__tga_load` (`GHSL-2023-147/CVE-2023-45663`)
- Double-free in `stbi__load_gif_main_outofmem` (`GHSL-2023-148/CVE-2023-45664`)
- Null pointer dereference in `stbi__convert_format` (`GHSL-2023-149`) HOT 1
- Possible double-free or memory leak in `stbi__load_gif_main` (`GHSL-2023-150/CVE-2023-45666`)
- Null pointer dereference because of an uninitialized variable (`GHSL-2023-151/CVE-2023-45667`)
- `0` byte write heap buffer overflow in `start_decoder` (`GHSL-2023-165/CVE-2023-45675`)
- (Docs Update Request) stb_image_write.h supports PNG/BMP/TGA/JPEG/HDR HOT 2
- Is the "DETAILED USAGE" section of `stb_truetype.h` correct/updated? HOT 3
- A way to reuse a buffer when reading `.gif` files HOT 2
- GCC warnings for the hmdel macro HOT 1
- stb_sprintf: not working with 'j' 'z' modifiers
- [text.txt](https://github.com/nothings/stb/files/13457062/text.txt)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stb.