Fixed buffer overflow.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 24 Oct 2013 00:00:10 -0400
changeset 7891 b34f5e226458
parent 7890 c031abe0b287
child 7892 b9663c77f5c9
Fixed buffer overflow.
src/filesystem/cocoa/SDL_sysfilesystem.m
--- a/src/filesystem/cocoa/SDL_sysfilesystem.m	Wed Oct 23 17:46:07 2013 -0700
+++ b/src/filesystem/cocoa/SDL_sysfilesystem.m	Thu Oct 24 00:00:10 2013 -0400
@@ -77,7 +77,7 @@
         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();