.hgignore
author Sam Lantinga <slouken@libsdl.org>
Wed, 10 Jul 2013 21:57:31 -0700
changeset 7396 a36ab6149a10
parent 7232 6f17d930be39
child 7572 e3c45fdcd18d
permissions -rw-r--r--
Fixed bug 1953 - Crash at memcpy X11_DispatchEvent(_THIS) Function Nitz In Function X11_DispatchEvent(_THIS), case SelectionNotify : static void X11_DispatchEvent(_THIS) { // Some Code case SelectionNotify: { //Some Code SDL_bool expect_lf = SDL_FALSE; char *start = NULL; // Initialised with NULL char *scan = (char*)p.data; char *fn; char *uri; int length = 0; while (p.count--) { if (!expect_lf) { if (*scan==0x0D) { expect_lf = SDL_TRUE; } else if(start == NULL) { start = scan; length = 0; } length++; } else { if (*scan==0x0A && length>0) { uri = malloc(length--); memcpy(uri, start, length); // Problem is Here, start is still NULL if control comes to else statement without initialising the start pointer, which is wrong uri[length] = 0; fn = X11_URIToLocal(uri); if (fn) SDL_SendDropFile(fn); free(uri); } expect_lf = SDL_FALSE; start = NULL; } scan++; } } As shown above how start pointer remains NULL, Patch for this issue would be: if (*scan==0x0D) { expect_lf = SDL_TRUE; } if(start == NULL) { start = scan; length = 0; } Just replace else if statement with if.

syntax:glob
aclocal.m4
autom4te*
config.cache
config.log
config.status
Makefile
sdl-config
SDL2.spec
build

# for Xcode
*.orig
*.swp
*.tmp
*.rej
*~
*.o
*.mode1*
*.model*
*.perspective*
*.perspective*
*.pbxuser
(^|/)build($|/)
.DS_Store
Xcode/SDL/SDL.xcodeproj/xcuserdata
Xcode/SDL/SDL.xcodeproj/project.xcworkspace
Xcode/SDLTest/SDLTest.xcodeproj/xcuserdata
Xcode/SDLTest/SDLTest.xcodeproj/project.xcworkspace
Xcode-iOS/SDL/SDL.xcodeproj/xcuserdata
Xcode-iOS/SDL/SDL.xcodeproj/project.xcworkspace
Xcode-iOS/Demos/Demos.xcodeproj/xcuserdata
Xcode-iOS/Demos/Demos.xcodeproj/project.xcworkspace

# for Visual C++
Debug
Release
*.user
*.ncb
*.suo

# for Android
android-project/local.properties

sdl.pc
test/autom4te*
test/config.cache
test/config.log
test/config.status
test/Makefile
test/SDL2.dll
test/checkkeys
test/loopwave
test/testatomic
test/testaudioinfo
test/testautomation
test/testdraw2
test/testerror
test/testfile
test/testgamecontroller
test/testgesture
test/testgl2
test/testgles
test/testhaptic
test/testiconv
test/testime
test/testintersections
test/testjoystick
test/testkeys
test/testloadso
test/testlock
test/testmessage
test/testmultiaudio
test/testnative
test/testoverlay2
test/testplatform
test/testpower
test/testrelative
test/testrendercopyex
test/testrendertarget
test/testresample
test/testrumble
test/testscale
test/testsem
test/testshader
test/testshape
test/testsprite2
test/testspriteminimal
test/teststreaming
test/testthread
test/testtimer
test/testver
test/testwm2
test/torturethread
test/*.exe
test/*.dSYM