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:
parent
3429a18dc4
commit
c7c2ee5d5a
14 changed files with 56 additions and 41 deletions
|
@ -34,6 +34,8 @@
|
|||
//#define nocasestrcmp(a,b) stricmp(a,b)
|
||||
#endif
|
||||
|
||||
#define safe_strncpy(a,b,n) do { strncpy((a),(b),(n)-1); (a)[(n)-1] = 0; } while (0)
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue