tag 152128 patch
thanks

Helge Kreutzmann <[EMAIL PROTECTED]> writes:

> Trying to open a vcg file causes a segfault. [...]

I think I've tracked this down to a memory overrun in src/X11dev.c.
Does the attached patch work for you?

Thanks,

Matej
--- vcg-1.30debian.orig/src/X11dev.c
+++ vcg-1.30debian/src/X11dev.c
@@ -1170,7 +1170,7 @@
        XSetWindowAttributes attr;
        XSizeHints hints;
        unsigned long mask = 0L;
-       XAnyEvent event;
+       XEvent event;
        int i;
 
        /* select for all events */
@@ -1271,8 +1271,8 @@
  */
 #ifndef ULTRIX
 #ifndef AIX
-        do { XNextEvent(root_display, (XEvent *)&event);
-        } while (event.type != Expose || event.window!=pix_window);
+        do { XNextEvent(root_display, &event);
+        } while (event.type != Expose || event.xany.window!=pix_window);
 #endif
 #endif
 

Reply via email to