Fixed buffer overflow.

main
Ryan C. Gordon 2013-10-24 00:00:10 -04:00
parent aa10a5d908
commit 609b58e441
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ SDL_GetPrefPath(const char *org, const char *app)
NSString *str = [array objectAtIndex:0];
const char *base = [str fileSystemRepresentation];
if (base) {
const size_t len = SDL_strlen(base) + SDL_strlen(app) + 4;
const size_t len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4;
retval = (char *) SDL_malloc(len);
if (retval == NULL) {
SDL_OutOfMemory();