asdfuser pushed a commit to branch ecore-1.7.
commit d79cd629c0bb9dd73091806977d814aec6873778
Author: Daniel Willmann <[email protected]>
Date: Mon May 20 16:57:14 2013 +0100
Backport 6d54f4: fix 64bit ecore-x selection overrun bug.
"""
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)
"""
Signed-off-by: Daniel Willmann <[email protected]>
---
ChangeLog | 13 +++++++++++++
NEWS | 7 +++++++
src/lib/ecore_x/xcb/ecore_xcb_selection.c | 4 ++--
src/lib/ecore_x/xlib/ecore_x_selection.c | 4 ++--
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 307e26b..1f61577 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1154,4 +1154,17 @@
* ecore_evas/wayland_shm: Backport frame_callback implementation.
2013-04-30 Rafael Antognolli
+
* ecore_evas/wayland_shm: Don't destroy a non-released buffer.
+
+2013-05-11 Rafael Antognolli
+
+ * 1.7.7 release
+
+2013-05-21 Daniel Willmann
+
+ * Backport (6d54f46) from Raster:
+ 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)
diff --git a/NEWS b/NEWS
index bf665df..e4013c8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+Changes since Ecore 1.7.7:
+--------------------------
+Additions:
+
+Fixes:
+ * Ecore-X: Fix selection parser to not overrun buffer read by using longs
on 64bit.
+
Ecore 1.7.7
Changes since Ecore 1.7.6:
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_selection.c
b/src/lib/ecore_x/xcb/ecore_xcb_selection.c
index 5496f89..9d1860e 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_selection.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_selection.c
@@ -902,13 +902,13 @@ _ecore_xcb_selection_parser_targets(const char *target
__UNUSED__,
int format __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;
diff --git a/src/lib/ecore_x/xlib/ecore_x_selection.c
b/src/lib/ecore_x/xlib/ecore_x_selection.c
index 7d4e1fc..1d1081a 100644
--- a/src/lib/ecore_x/xlib/ecore_x_selection.c
+++ b/src/lib/ecore_x/xlib/ecore_x_selection.c
@@ -984,12 +984,12 @@ _ecore_x_selection_parser_targets(const char *target
__UNUSED__,
int format __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 *));
--
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d