SDL_image
SDL_image copied to clipboard
IMG_LoadTexture_RW read too much data, far beyond the end of the PNG data
The IMG_LoadTexture_RW
function can load a PNG image saved in the stream, but if the stream contains some data after it (because it is, for example, a binary file with a lot of data), then after reading the PNG, the stream pointer is moved much too far, which further data could not be read correctly. The same problem occurs with the IMG_LoadTextureTyped_RW
function.
The original discussion is here: https://discourse.libsdl.org/t/img-loadtexture-rw-seems-to-load-too-much-data