mirror of https://github.com/ioquake/ioq3.git
Fix possible levelPicNames buffer overflow in q3_ui
This commit is contained in:
parent
daa604ae9b
commit
af617bc0e6
|
@ -236,7 +236,7 @@ static void UI_SPLevelMenu_SetMenuArena( int n, int level, const char *arenaInfo
|
||||||
levelMenuInfo.levelScores[n] = 8;
|
levelMenuInfo.levelScores[n] = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy( levelMenuInfo.levelPicNames[n], va( "levelshots/%s.tga", map ) );
|
Com_sprintf( levelMenuInfo.levelPicNames[n], sizeof(levelMenuInfo.levelPicNames[n]), "levelshots/%s.tga", map );
|
||||||
if( !trap_R_RegisterShaderNoMip( levelMenuInfo.levelPicNames[n] ) ) {
|
if( !trap_R_RegisterShaderNoMip( levelMenuInfo.levelPicNames[n] ) ) {
|
||||||
strcpy( levelMenuInfo.levelPicNames[n], ART_MAP_UNKNOWN );
|
strcpy( levelMenuInfo.levelPicNames[n], ART_MAP_UNKNOWN );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue