From 609b58e4417d0f9d0996943d1b97891587b4bd15 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 24 Oct 2013 00:00:10 -0400 Subject: [PATCH] Fixed buffer overflow. --- src/filesystem/cocoa/SDL_sysfilesystem.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesystem/cocoa/SDL_sysfilesystem.m b/src/filesystem/cocoa/SDL_sysfilesystem.m index 760830a7f..587c35cc0 100644 --- a/src/filesystem/cocoa/SDL_sysfilesystem.m +++ b/src/filesystem/cocoa/SDL_sysfilesystem.m @@ -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();