TODO.txt
author Sam Lantinga <slouken@libsdl.org>
Wed, 10 Jul 2013 21:57:31 -0700
changeset 7396 a36ab6149a10
parent 7222 2435b221d77d
child 7856 cb37776926ad
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.

Future work roadmap:
 * http://wiki.libsdl.org/moin.cgi/Roadmap

 * See why windows are being rearranged.  Is the shield window not up?
 * Add __WINDOWS__ in addition to __WIN32__
 * Write test for fullscreen gamma to check X11 colormap handling

 * Check 1.2 revisions:
	3554 - Need to resolve semantics for locking keys on different platforms
	4874 - Do we want screen rotation?  At what level?
	4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98
	4484, 4485 - Verify that SDL's Windows keyboard handling works correctly
	4865 - See if this is still needed (mouse coordinate clamping)
	4866 - See if this is still needed (blocking window repositioning)