Merge pull request #5618 from arifogel/ari-fix-savestate-buffer-overflow

Fix intermittent buffer overflow upon savestate
This commit is contained in:
Jonathan Campbell 2025-04-06 23:51:43 -07:00 committed by GitHub
commit 9b7722e7e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 );