Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!ucbvax!ZERMATT.LCS.MIT.EDU!RWS From: RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) Newsgroups: comp.windows.x Subject: V11 fix #33, clients/xwd/xwd.c, xwd stored bogosity for the window name Message-ID: <871026171721.1.RWS@KILLINGTON.LCS.MIT.EDU> Date: Mon, 26-Oct-87 17:17:00 EST Article-I.D.: KILLINGT.871026171721.1.RWS Posted: Mon Oct 26 17:17:00 1987 Date-Received: Thu, 29-Oct-87 01:56:11 EST References: <8710262129.AA14737@hc.dspo.gov> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 72 Date: Mon, 26 Oct 87 14:29:26 MST From: engquist@hc.dspo.gov (Eric Engquist) I received a bug via xpert mailing list which I can't find in the bug reports 1-30. The bug description was sent out Fri Oct 16 and its description was xwd stored bogosity for the window name. Is this a genuine bug? FIX: Yes, it is a genuine bug and fix. I can't find it either, so I repeat the fix here. in clients/xwd/xwd.c: *** /tmp/,RCSt1005639 Mon Oct 26 17:10:32 1987 --- xwd.c Fri Oct 9 14:37:10 1987 *************** *** 37,43 **** */ #ifndef lint ! static char *rcsid_xwd_c = "$Header: xwd.c,v 1.28 87/09/11 16:57:09 rws Exp $"; #endif /*% --- 37,43 ---- */ #ifndef lint ! static char *rcsid_xwd_c = "$Header: xwd.c,v 1.29 87/10/09 14:36:37 newman Exp $"; #endif /*% *************** *** 140,146 **** int win_name_size; int header_size; int ncolors, i; ! char win_name[100]; XWindowAttributes win_info; XImage *image; --- 140,146 ---- int win_name_size; int header_size; int ncolors, i; ! char *win_name; XWindowAttributes win_info; XImage *image; *************** *** 159,167 **** if(!XGetWindowAttributes(dpy, window, &win_info)) Fatal_Error("Can't get target window attributes."); ! XFetchName(dpy, window, win_name); ! if (!win_name[0]) ! strcpy(win_name, "xwdump"); /* sizeof(char) is included for the null string terminator. */ win_name_size = strlen(win_name) + sizeof(char); --- 159,167 ---- if(!XGetWindowAttributes(dpy, window, &win_info)) Fatal_Error("Can't get target window attributes."); ! XFetchName(dpy, window, &win_name); ! if (!win_name || !win_name[0]) ! win_name = "xwdump"; /* sizeof(char) is included for the null string terminator. */ win_name_size = strlen(win_name) + sizeof(char);