fix 64bit ecore-x selection overrun bug.

This commit is contained in:
Carsten Haitzler 2013-04-20 10:31:01 +09:00
parent 36b1b06a60
commit 6d54f4608d
4 changed files with 12 additions and 4 deletions

View File

@ -3,6 +3,13 @@
* Edje: When selected word exists, selection is cleared and cursor
remains on the current edje_entry by additional key input.
2013-04-20 Carsten Haitzler (The Rasterman)
* Ecore-X: Fix selection parser to not use longs - wrong on
64bit as the rest of ecore-x keeps types to their REAL sizes (ints),
but xlib uses longs (change size - eg 64bit even though protocol-wise
the data is DEFINEd as 32bit)
2013-04-19 Jihoon Kim (jihoon)
* Edje: Remove code to call ecore_imf_context_reset in case of pressing ESC, Return key

1
NEWS
View File

@ -252,3 +252,4 @@ Fixes:
* Evas: Fix evas gl_x11 in 16bpp and lower depths than 24/32 bpp.
* Edje: Fix useless ecore_imf_context_reset call in case of pressing ESC and Return key
* Edje: When selected word exists, selection is cleared and cursor remains on the current entry by additional key input.
* Ecore-X: Fix selection parser to not overrun buffer read by using longs on 64bit.

View File

@ -865,13 +865,13 @@ _ecore_xcb_selection_parser_targets(const char *target EINA_UNUSED,
int format EINA_UNUSED)
{
Ecore_X_Selection_Data_Targets *sel;
unsigned long *targets;
int *targets;
int i = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
CHECK_XCB_CONN;
if (!(targets = (unsigned long *)data)) return NULL;
if (!(targets = data)) return NULL;
sel = calloc(1, sizeof(Ecore_X_Selection_Data_Targets));
if (!sel) return NULL;

View File

@ -959,12 +959,12 @@ _ecore_x_selection_parser_targets(const char *target EINA_UNUSED,
int format EINA_UNUSED)
{
Ecore_X_Selection_Data_Targets *sel;
unsigned long *targets;
int *targets;
int i;
sel = calloc(1, sizeof(Ecore_X_Selection_Data_Targets));
if (!sel) return NULL;
targets = (unsigned long *)data;
targets = data;
sel->num_targets = size - 2;
sel->targets = malloc((size - 2) * sizeof(char *));