forked from enlightenment/efl
fix 64bit ecore-x selection overrun bug.
This commit is contained in:
parent
36b1b06a60
commit
6d54f4608d
|
@ -3,6 +3,13 @@
|
||||||
* Edje: When selected word exists, selection is cleared and cursor
|
* Edje: When selected word exists, selection is cleared and cursor
|
||||||
remains on the current edje_entry by additional key input.
|
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)
|
2013-04-19 Jihoon Kim (jihoon)
|
||||||
|
|
||||||
* Edje: Remove code to call ecore_imf_context_reset in case of pressing ESC, Return key
|
* Edje: Remove code to call ecore_imf_context_reset in case of pressing ESC, Return key
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -252,3 +252,4 @@ Fixes:
|
||||||
* Evas: Fix evas gl_x11 in 16bpp and lower depths than 24/32 bpp.
|
* 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: 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.
|
* 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.
|
||||||
|
|
|
@ -865,13 +865,13 @@ _ecore_xcb_selection_parser_targets(const char *target EINA_UNUSED,
|
||||||
int format EINA_UNUSED)
|
int format EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Ecore_X_Selection_Data_Targets *sel;
|
Ecore_X_Selection_Data_Targets *sel;
|
||||||
unsigned long *targets;
|
int *targets;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
CHECK_XCB_CONN;
|
CHECK_XCB_CONN;
|
||||||
|
|
||||||
if (!(targets = (unsigned long *)data)) return NULL;
|
if (!(targets = data)) return NULL;
|
||||||
|
|
||||||
sel = calloc(1, sizeof(Ecore_X_Selection_Data_Targets));
|
sel = calloc(1, sizeof(Ecore_X_Selection_Data_Targets));
|
||||||
if (!sel) return NULL;
|
if (!sel) return NULL;
|
||||||
|
|
|
@ -959,12 +959,12 @@ _ecore_x_selection_parser_targets(const char *target EINA_UNUSED,
|
||||||
int format EINA_UNUSED)
|
int format EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Ecore_X_Selection_Data_Targets *sel;
|
Ecore_X_Selection_Data_Targets *sel;
|
||||||
unsigned long *targets;
|
int *targets;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
sel = calloc(1, sizeof(Ecore_X_Selection_Data_Targets));
|
sel = calloc(1, sizeof(Ecore_X_Selection_Data_Targets));
|
||||||
if (!sel) return NULL;
|
if (!sel) return NULL;
|
||||||
targets = (unsigned long *)data;
|
targets = data;
|
||||||
|
|
||||||
sel->num_targets = size - 2;
|
sel->num_targets = size - 2;
|
||||||
sel->targets = malloc((size - 2) * sizeof(char *));
|
sel->targets = malloc((size - 2) * sizeof(char *));
|
||||||
|
|
Loading…
Reference in New Issue