Fixed buffer overflow.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 24 Oct 2013 00:00:10 -0400
changeset 7891b34f5e226458
parent 7890 c031abe0b287
child 7892 b9663c77f5c9
Fixed buffer overflow.
src/filesystem/cocoa/SDL_sysfilesystem.m
     1.1 --- a/src/filesystem/cocoa/SDL_sysfilesystem.m	Wed Oct 23 17:46:07 2013 -0700
     1.2 +++ b/src/filesystem/cocoa/SDL_sysfilesystem.m	Thu Oct 24 00:00:10 2013 -0400
     1.3 @@ -77,7 +77,7 @@
     1.4          NSString *str = [array objectAtIndex:0];
     1.5          const char *base = [str fileSystemRepresentation];
     1.6          if (base) {
     1.7 -            const size_t len = SDL_strlen(base) + SDL_strlen(app) + 4;
     1.8 +            const size_t len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4;
     1.9              retval = (char *) SDL_malloc(len);
    1.10              if (retval == NULL) {
    1.11                  SDL_OutOfMemory();