mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-08 19:32:39 +08:00
Fix intermittent buffer overflow upon savestate
* allocate missing byte for string terminator for savestate filename
This commit is contained in:
parent
0ef6c2d020
commit
9e091cb689
@ -2287,7 +2287,7 @@ void POD_Save_DOS_Files( std::ostream& stream )
|
||||
//**********************************************
|
||||
//**********************************************
|
||||
|
||||
file_namelen = (uint8_t)strlen( Files[lcv]->name );
|
||||
file_namelen = (uint8_t)( strlen( Files[lcv]->name ) + 1 );
|
||||
file_name = (char *) alloca( file_namelen );
|
||||
strcpy( file_name, Files[lcv]->name );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user