summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/ecore_x/xcb/ecore_xcb_image.c4
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_image.c4
4 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d963400da4..d4d88a946d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12013-07-15 Mike Blumenkrantz
2
3 * Ecore-X: fix BadMatch errors in ecore_x_image_get when requested size was larger than XImage size
4
12013-07-15 Cedric Bail 52013-07-15 Cedric Bail
2 6
3 * Eet: Add support for EET_T_VALUE to serialize Eina_Value pointer. 7 * Eet: Add support for EET_T_VALUE to serialize Eina_Value pointer.
diff --git a/NEWS b/NEWS
index 6069904e85..c71b20f2c1 100644
--- a/NEWS
+++ b/NEWS
@@ -342,6 +342,7 @@ Fixes:
342 - Fix alpha set function not clear sync counter. 342 - Fix alpha set function not clear sync counter.
343 - Fix selection parser to not overrun buffer read by using longs on 64bit. 343 - Fix selection parser to not overrun buffer read by using longs on 64bit.
344 - Fix x11 selection trailing nul byte in text. 344 - Fix x11 selection trailing nul byte in text.
345 - Fix BadMatch errors in ecore_x_image_get when requested size was larger than XImage size
345 * Ecore_Wayland: 346 * Ecore_Wayland:
346 - Fix return type of function ecore_wl_outputs_get(). 347 - Fix return type of function ecore_wl_outputs_get().
347 * Ecore_Input_Evas: 348 * Ecore_Input_Evas:
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_image.c b/src/lib/ecore_x/xcb/ecore_xcb_image.c
index bce5df3a1d..67a1470ffd 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_image.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_image.c
@@ -96,8 +96,8 @@ ecore_x_image_get(Ecore_X_Image *im,
96 { 96 {
97 im->xim->data = (uint8_t *)im->data + (im->xim->stride * sy) + 97 im->xim->data = (uint8_t *)im->data + (im->xim->stride * sy) +
98 (sx * im->bpp); 98 (sx * im->bpp);
99 im->xim->width = w; 99 im->xim->width = MIN(w, im->w);
100 im->xim->height = h; 100 im->xim->height = MIN(h, im->h);
101 101
102 ecore_x_grab(); 102 ecore_x_grab();
103 if (!xcb_image_shm_get(_ecore_xcb_conn, draw, im->xim, 103 if (!xcb_image_shm_get(_ecore_xcb_conn, draw, im->xim,
diff --git a/src/lib/ecore_x/xlib/ecore_x_image.c b/src/lib/ecore_x/xlib/ecore_x_image.c
index 3ae9b6303e..af7417edf4 100644
--- a/src/lib/ecore_x/xlib/ecore_x_image.c
+++ b/src/lib/ecore_x/xlib/ecore_x_image.c
@@ -293,8 +293,8 @@ ecore_x_image_get(Ecore_X_Image *im,
293 { 293 {
294 im->xim->data = (char *) 294 im->xim->data = (char *)
295 im->data + (im->xim->bytes_per_line * sy) + (sx * im->bpp); 295 im->data + (im->xim->bytes_per_line * sy) + (sx * im->bpp);
296 im->xim->width = w; 296 im->xim->width = MIN(w, im->w);
297 im->xim->height = h; 297 im->xim->height = MIN(h, im->h);
298 XGrabServer(_ecore_x_disp); 298 XGrabServer(_ecore_x_disp);
299 if (!XShmGetImage(_ecore_x_disp, draw, im->xim, x, y, 0xffffffff)) 299 if (!XShmGetImage(_ecore_x_disp, draw, im->xim, x, y, 0xffffffff))
300 ret = EINA_FALSE; 300 ret = EINA_FALSE;