ALT Linux Bugzilla
– Attachment 4049 Details for
Bug 22222
xorg server crashes on drawing line with sertain form and type by libX11
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
Program that crashes xorg server. Build with -lX11
xkiller.c (text/x-csrc), 1.39 KB, created by
Vladislav Zavjalov
on 2009-11-09 14:15:55 MSK
(
hide
)
Description:
Program that crashes xorg server. Build with -lX11
Filename:
MIME Type:
Creator:
Vladislav Zavjalov
Created:
2009-11-09 14:15:55 MSK
Size:
1.39 KB
patch
obsolete
>#include<X11/Xlib.h> > >#include<stdio.h> >#include<stdlib.h> > >int main() >{ > Display *dpy; > Window rootwin; > Window win; > Colormap cmap; > XEvent e; > int scr; > GC gc; > XGCValues gcv; > unsigned long gcv_mask; > > XPoint points[14]; > > int coords[] = {156, 38, 139, 24, 121, 26, 96, 39, 90, 58, > 101, 82, 121, 107, 142, 148, 167, 166, 197, 166, > 212, 147, 212, 130, 207, 116, 156, 38}; > int i; > int np=sizeof(coords)/sizeof(int)/2; > > for (i=0; i<np; i++){ > points[i].x = coords[2*i]/4; > points[i].y = coords[2*i+1]/4; > } > > gcv.line_width=9; > gcv.line_style=LineOnOffDash; > gcv.cap_style=CapProjecting; > gcv.dashes=15; > gcv_mask=GCLineWidth | GCLineStyle | GCCapStyle | GCDashList; > > if(!(dpy=XOpenDisplay(NULL))) { > fprintf(stderr, "ERROR: could not open display\n"); > exit(1); > } > scr = DefaultScreen(dpy); > rootwin = RootWindow(dpy, scr); > cmap = DefaultColormap(dpy, scr); > win=XCreateSimpleWindow(dpy, rootwin, 1, 1, 640, 480, 0, > BlackPixel(dpy, scr), BlackPixel(dpy, scr)); > > gc=XCreateGC(dpy, win, gcv_mask, &gcv); > XSetForeground(dpy, gc, WhitePixel(dpy, scr)); > XSelectInput(dpy, win, ExposureMask|ButtonPressMask); > > XMapWindow(dpy, win); > > while(1) { > XNextEvent(dpy, &e); > if(e.type==Expose && e.xexpose.count<1) > XDrawLines(dpy, win, gc, points, np, CoordModeOrigin); > else if(e.type==ButtonPress) break; > } > > XCloseDisplay(dpy); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 22222
: 4049 |
4089