Skip to content

Commit 0691c50

Browse files
klaussilveiraDanielGibson
authored andcommitted
Fix buffer overflow warnings in dmap.cpp
1 parent e63fbe6 commit 0691c50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neo/tools/compilers/dmap/dmap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void Dmap( const idCmdArgs &args ) {
309309
bool region = false;
310310
// if this isn't a regioned map, delete the last saved region map
311311
if ( passedName.Right( 4 ) != ".reg" ) {
312-
sprintf( path, "%s.reg", dmapGlobals.mapFileBase );
312+
idStr::snPrintf( path, sizeof(path), "%s.reg", dmapGlobals.mapFileBase );
313313
fileSystem->RemoveFile( path );
314314
} else {
315315
region = true;
@@ -319,7 +319,7 @@ void Dmap( const idCmdArgs &args ) {
319319
passedName = stripped;
320320

321321
// delete any old line leak files
322-
sprintf( path, "%s.lin", dmapGlobals.mapFileBase );
322+
idStr::snPrintf( path, sizeof(path), "%s.lin", dmapGlobals.mapFileBase );
323323
fileSystem->RemoveFile( path );
324324

325325

0 commit comments

Comments
 (0)