ref: soft: Fix out of bounds memory access in VID_ScreenShot

This commit is contained in:
Max Parry
2025-12-06 19:41:46 +11:00
committed by GitHub
parent a4f8fc2205
commit 2c20734ad3

View File

@@ -861,7 +861,7 @@ qboolean GAME_EXPORT VID_ScreenShot( const char *filename, int shot_type )
for( v = 0; v < vid.height; v++ )
{
uint start = vid.rowbytes * ( vid.height - v );
uint start = vid.rowbytes * ( vid.height - v - 1 );
uint d = swblit.stride - v - 1;
for( u = 0; u < vid.width; u++ )
@@ -877,7 +877,7 @@ qboolean GAME_EXPORT VID_ScreenShot( const char *filename, int shot_type )
for( v = 0; v < vid.height; v++ )
{
uint start = vid.rowbytes * ( vid.height - v );
uint start = vid.rowbytes * ( vid.height - v - 1 );
uint dstart = swblit.stride * v;
for( u = 0; u < vid.width; u++ )