sys/ximage/gstximagesrc.c: Fix segfault when moving mouse pointer to the bottom right corner.

Original commit message from CVS:
2006-07-14  Zaheer Abbas Merali  <zaheerabbas at merali dot org>

* sys/ximage/gstximagesrc.c: (gst_ximage_src_ximage_get),
(gst_ximage_src_get_caps), (gst_ximage_src_class_init):
Fix segfault when moving mouse pointer to the bottom right corner.
This commit is contained in:
Zaheer Abbas Merali 2006-07-14 12:01:05 +00:00
parent 4ce8822169
commit 197d6a6cb0
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2006-07-14 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* sys/ximage/gstximagesrc.c: (gst_ximage_src_ximage_get),
(gst_ximage_src_get_caps), (gst_ximage_src_class_init):
Fix segfault when moving mouse pointer to the bottom right corner.
2006-07-12 Wim Taymans <wim@fluendo.com>
* gst/rtp/Makefile.am:

View file

@ -601,10 +601,8 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
GUINT_TO_LE (ximagesrc->cursor_image->pixels[i]);
/* copy those pixels across */
for (j = starty;
j < starty + iheight && j - starty < ximagesrc->height; j++) {
for (i = startx;
i < startx + iwidth && i - startx < ximagesrc->width; i++) {
for (j = starty; j < starty + iheight && j < ximagesrc->height; j++) {
for (i = startx; i < startx + iwidth && i < ximagesrc->width; i++) {
guint8 *src, *dest;
src =