The change in 2.0.10 for the SDL_RW macros to functions appears to no longer automatically apply a null terminator at the end of the void ptr* that is passed in after the data is read.
This code would read exactly 7 characters in 1 byte sizes and apply \0 at the 7th place.
char data[7];
SDL_RWread( rwops, &data, 7, 1 );
The code is wrong, and that it worked with SDL_RW from 2.0.8 seems to be luck?
it fails for me with SDL2-2.0.8 for obvious reasons: With a char[7] array, you can’t
expect to add a zero at 7th place and printf() to print 7 characters. The following
works, though, with both 2.0.8 and 2.0.10:
If you tell it to read 7 bytes and write them to the buffer, and it writes \0 as an 8th byte to the buffer, that is be a buffer overflow.
If that was indeed the behavior in 2.0.8, it was a bug.
If it instead reads 6 bytes and writes \0 as 7th when you tell it to read 7 bytes, I’d consider that a data corruption bug.