1
0
Fork 0

Add patch 1239754 from Moe. This patches fixes a few crashes by checking the SDL_SetMode return value and it changes strncopy to a safe_strncopy which adds a 0 to each string copied

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2240
This commit is contained in:
Peter Veenstra 2005-07-19 19:45:33 +00:00
parent 3429a18dc4
commit c7c2ee5d5a
14 changed files with 56 additions and 41 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: mixer.cpp,v 1.33 2005-04-29 13:45:26 qbix79 Exp $ */
/* $Id: mixer.cpp,v 1.34 2005-07-19 19:45:32 qbix79 Exp $ */
/*
Remove the sdl code from here and have it handeld in the sdlmain.
@ -486,7 +486,7 @@ static void MIXER_ProgramStart(Program * * make) {
MixerChannel* MixerObject::Install(MIXER_Handler handler,Bitu freq,char * name){
if(!installed) {
if(strlen(name) > 31) E_Exit("Too long mixer channel name");
strncpy(m_name,name,31);
safe_strncpy(m_name,name,32);
installed = true;
return MIXER_AddChannel(handler,freq,name);
} else {