Your message dated Thu, 19 Apr 2012 21:34:20 +0000 with message-id <E1SKyzc-0005wK-9t@franck.debian.org> and subject line Bug#278984: fixed in libx11 2:1.4.99.901-1 has caused the Debian Bug report #278984, regarding libx11-6: XQueryColors() doesn't return if ncolors is 65536. to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 278984: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=278984 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: libx11-6: XQueryColors() doesn't return if ncolors is 65536.
- From: Kusanagi Kouichi <slash@ma.neweb.ne.jp>
- Date: Sun, 31 Oct 2004 04:35:02 +0900
- Message-id: <20041030193502.16512.qmail@crescent>
Package: libx11-6 Version: 4.3.0.dfsg.1-8 Severity: normal Tags: patch XQueryColors() doesn't return if ncolors is 65536, at least on the 16-bit TrueColor screen. Test program and patch are attatched. % xdpyinfo name of display: :0.0 version number: 11.0 vendor string: The XFree86 Project, Inc vendor release number: 40300001 XFree86 version: 4.3.0.1 maximum request size: 4194300 bytes motion buffer size: 256 bitmap unit, bit order, padding: 32, LSBFirst, 32 image byte order: LSBFirst number of supported pixmap formats: 7 supported pixmap formats: depth 1, bits_per_pixel 1, scanline_pad 32 depth 4, bits_per_pixel 8, scanline_pad 32 depth 8, bits_per_pixel 8, scanline_pad 32 depth 15, bits_per_pixel 16, scanline_pad 32 depth 16, bits_per_pixel 16, scanline_pad 32 depth 24, bits_per_pixel 32, scanline_pad 32 depth 32, bits_per_pixel 32, scanline_pad 32 keycode range: minimum 8, maximum 255 focus: window 0xe00003, revert to Parent number of extensions: 28 BIG-REQUESTS DOUBLE-BUFFER DPMS Extended-Visual-Information FontCache GLX LBX MIT-SCREEN-SAVER MIT-SHM MIT-SUNDRY-NONSTANDARD RANDR RENDER SECURITY SGI-GLX SHAPE SYNC TOG-CUP X-Resource XC-APPGROUP XC-MISC XFree86-Bigfont XFree86-DGA XFree86-Misc XFree86-VidModeExtension XInputExtension XKEYBOARD XTEST XVideo default screen number: 0 number of screens: 1 screen #0: dimensions: 1600x1200 pixels (330x242 millimeters) resolution: 123x126 dots per inch depths (7): 16, 1, 4, 8, 15, 24, 32 root window id: 0x41 depth of root window: 16 planes number of colormaps: minimum 1, maximum 1 default colormap: 0x20 default number of colormap cells: 64 preallocated pixels: black 0, white 65535 options: backing-store NO, save-unders NO largest cursor: 64x64 current input event mask: 0xda003f KeyPressMask KeyReleaseMask ButtonPressMask ButtonReleaseMask EnterWindowMask LeaveWindowMask StructureNotifyMask SubstructureNotifyMask SubstructureRedirectMask PropertyChangeMask ColormapChangeMask number of visuals: 8 default visual id: 0x23 visual: visual id: 0x23 class: TrueColor depth: 16 planes available colormap entries: 64 per subfield red, green, blue masks: 0xf800, 0x7e0, 0x1f significant bits in color specification: 6 bits visual: visual id: 0x24 class: TrueColor depth: 16 planes available colormap entries: 64 per subfield red, green, blue masks: 0xf800, 0x7e0, 0x1f significant bits in color specification: 6 bits visual: visual id: 0x25 class: TrueColor depth: 16 planes available colormap entries: 64 per subfield red, green, blue masks: 0xf800, 0x7e0, 0x1f significant bits in color specification: 6 bits visual: visual id: 0x26 class: TrueColor depth: 16 planes available colormap entries: 64 per subfield red, green, blue masks: 0xf800, 0x7e0, 0x1f significant bits in color specification: 6 bits visual: visual id: 0x27 class: DirectColor depth: 16 planes available colormap entries: 64 per subfield red, green, blue masks: 0xf800, 0x7e0, 0x1f significant bits in color specification: 6 bits visual: visual id: 0x28 class: DirectColor depth: 16 planes available colormap entries: 64 per subfield red, green, blue masks: 0xf800, 0x7e0, 0x1f significant bits in color specification: 6 bits visual: visual id: 0x29 class: DirectColor depth: 16 planes available colormap entries: 64 per subfield red, green, blue masks: 0xf800, 0x7e0, 0x1f significant bits in color specification: 6 bits visual: visual id: 0x2a class: DirectColor depth: 16 planes available colormap entries: 64 per subfield red, green, blue masks: 0xf800, 0x7e0, 0x1f significant bits in color specification: 6 bits % cat querycolors.c #include <stdio.h> #include <X11/Xlib.h> int main(void) { Display *display; Colormap cmap; XColor color[65536]; unsigned long i; display = XOpenDisplay(NULL); if (display == NULL) { return 1; } cmap = DefaultColormap(display, DefaultScreen(display)); for (i = 0; i < 65536; ++i) { color[i].pixel = i; } XQueryColors(display, cmap, color, 65536); for (i = 0; i < 65536; ++i) { printf("pixel: 0x%04lX red: 0x%04X green: 0x%04X blue: 0x%04X\n", i, color[i].red, color[i].green, color[i].blue); } XCloseDisplay(display); return 0; } % gcc -L/usr/X11R6/lib querycolors.c -lX11 % ./a.out -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.9 Locale: LANG=ja_JP.eucJP, LC_CTYPE=ja_JP.eucJP (charmap=EUC-JP) Versions of packages libx11-6 depends on: ii debconf [debconf-2.0] 1.4.39 Debian configuration management sy ii libc6 2.3.2.ds1-18 GNU C Library: Shared libraries an ii xfree86-common 4.3.0.dfsg.1-8 X Window System (XFree86) infrastr ii xlibs-data 4.3.0.dfsg.1-8 X Window System client data -- debconf information: libx11-6/migrate_xkb_dir: true#include <stdio.h> #include <X11/Xlib.h> int main(void) { Display *display; Colormap cmap; XColor color[65536]; unsigned long i; display = XOpenDisplay(NULL); if (display == NULL) { return 1; } cmap = DefaultColormap(display, DefaultScreen(display)); for (i = 0; i < 65536; ++i) { color[i].pixel = i; } XQueryColors(display, cmap, color, 65536); for (i = 0; i < 65536; ++i) { printf("pixel: 0x%04lX red: 0x%04X green: 0x%04X blue: 0x%04X\n", i, color[i].red, color[i].green, color[i].blue); } XCloseDisplay(display); return 0; }--- xc/lib/X11/QuColors.c.orig 2004-10-30 13:34:19.000000000 +0900 +++ xc/lib/X11/QuColors.c 2004-10-31 03:16:32.000000000 +0900 @@ -36,40 +36,62 @@ XColor *defs; /* RETURN */ int ncolors; { - register int i; - xrgb *color; - xQueryColorsReply rep; - long nbytes; - register xQueryColorsReq *req; + long max; + XColor *next; + unsigned int rest; LockDisplay(dpy); - GetReq(QueryColors, req); - req->cmap = cmap; - req->length += ncolors; /* each pixel is a CARD32 */ - - for (i = 0; i < ncolors; i++) - Data32 (dpy, (long *)&defs[i].pixel, 4L); - /* XXX this isn't very efficient */ - - if (_XReply(dpy, (xReply *) &rep, 0, xFalse) != 0) { - if ((color = (xrgb *) - Xmalloc((unsigned) (nbytes = (long) ncolors * SIZEOF(xrgb))))) { - - _XRead(dpy, (char *) color, nbytes); - - for (i = 0; i < ncolors; i++) { - register XColor *def = &defs[i]; - register xrgb *rgb = &color[i]; - def->red = rgb->red; - def->green = rgb->green; - def->blue = rgb->blue; - def->flags = DoRed | DoGreen | DoBlue; + max = dpy->max_request_size - (sizeof (xQueryColorsReq) >> 2); + if (max > 65535) + max = 65535; + + next = defs; + rest = ncolors; + while (rest) { + register unsigned int i; + xrgb *color; + xQueryColorsReply rep; + long nbytes; + register xQueryColorsReq *req; + unsigned int npixels; + + GetReq(QueryColors, req); + + req->cmap = cmap; + if (rest > max) + npixels = max; + else + npixels = rest; + req->length += npixels; + rest -= npixels; + + for (i = 0; i < npixels; i++) + Data32 (dpy, (long *)&next[i].pixel, 4L); + /* XXX this isn't very efficient */ + + if (_XReply(dpy, (xReply *) &rep, 0, xFalse) != 0) { + if ((color = (xrgb *) + Xmalloc((unsigned) (nbytes = (long) npixels * SIZEOF(xrgb))))) { + + _XRead(dpy, (char *) color, nbytes); + + for (i = 0; i < npixels; i++) { + register XColor *def = &next[i]; + register xrgb *rgb = &color[i]; + def->red = rgb->red; + def->green = rgb->green; + def->blue = rgb->blue; + def->flags = DoRed | DoGreen | DoBlue; + } + Xfree((char *)color); } - Xfree((char *)color); + else _XEatData(dpy, (unsigned long) nbytes); + + next += npixels; } - else _XEatData(dpy, (unsigned long) nbytes); } + UnlockDisplay(dpy); SyncHandle(); return 1;
--- End Message ---
--- Begin Message ---
- To: 278984-close@bugs.debian.org
- Subject: Bug#278984: fixed in libx11 2:1.4.99.901-1
- From: Julien Cristau <jcristau@debian.org>
- Date: Thu, 19 Apr 2012 21:34:20 +0000
- Message-id: <E1SKyzc-0005wK-9t@franck.debian.org>
Source: libx11 Source-Version: 2:1.4.99.901-1 We believe that the bug you reported is fixed in the latest version of libx11, which is due to be installed in the Debian FTP archive: libx11-6-dbg_1.4.99.901-1_amd64.deb to main/libx/libx11/libx11-6-dbg_1.4.99.901-1_amd64.deb libx11-6-udeb_1.4.99.901-1_amd64.udeb to main/libx/libx11/libx11-6-udeb_1.4.99.901-1_amd64.udeb libx11-6_1.4.99.901-1_amd64.deb to main/libx/libx11/libx11-6_1.4.99.901-1_amd64.deb libx11-data_1.4.99.901-1_all.deb to main/libx/libx11/libx11-data_1.4.99.901-1_all.deb libx11-dev_1.4.99.901-1_amd64.deb to main/libx/libx11/libx11-dev_1.4.99.901-1_amd64.deb libx11-doc_1.4.99.901-1_all.deb to main/libx/libx11/libx11-doc_1.4.99.901-1_all.deb libx11-xcb-dev_1.4.99.901-1_amd64.deb to main/libx/libx11/libx11-xcb-dev_1.4.99.901-1_amd64.deb libx11-xcb1-dbg_1.4.99.901-1_amd64.deb to main/libx/libx11/libx11-xcb1-dbg_1.4.99.901-1_amd64.deb libx11-xcb1_1.4.99.901-1_amd64.deb to main/libx/libx11/libx11-xcb1_1.4.99.901-1_amd64.deb libx11_1.4.99.901-1.diff.gz to main/libx/libx11/libx11_1.4.99.901-1.diff.gz libx11_1.4.99.901-1.dsc to main/libx/libx11/libx11_1.4.99.901-1.dsc libx11_1.4.99.901.orig.tar.gz to main/libx/libx11/libx11_1.4.99.901.orig.tar.gz A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 278984@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Julien Cristau <jcristau@debian.org> (supplier of updated libx11 package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Format: 1.8 Date: Thu, 19 Apr 2012 22:58:30 +0200 Source: libx11 Binary: libx11-6 libx11-6-udeb libx11-data libx11-6-dbg libx11-dev libx11-xcb1 libx11-xcb1-dbg libx11-xcb-dev libx11-doc Architecture: source all amd64 Version: 2:1.4.99.901-1 Distribution: unstable Urgency: low Maintainer: Debian X Strike Force <debian-x@lists.debian.org> Changed-By: Julien Cristau <jcristau@debian.org> Description: libx11-6 - X11 client-side library libx11-6-dbg - X11 client-side library (debug package) libx11-6-udeb - X11 client-side library (udeb) libx11-data - X11 client-side library libx11-dev - X11 client-side library (development headers) libx11-doc - X11 client-side library (development documentation) libx11-xcb-dev - Xlib/XCB interface library (development headers) libx11-xcb1 - Xlib/XCB interface library libx11-xcb1-dbg - Xlib/XCB interface library (debug package) Closes: 278984 659558 Changes: libx11 (2:1.4.99.901-1) unstable; urgency=low . * New upstream release candidate (1.5 RC1) - XQueryColors: split a request into multiple requests if necessary (closes: #278984) - Revert "xcb: Add TCP fallback" (closes: #659558) * Don't require (fake)root for debian/rules clean. * Drop xorg-sgml-doctools dependency from libx11-doc, the css is now included in the html files directly. Also add Breaks in addition to the Replaces on old libx11-dev. * Add build-indep and build-arch targets, don't build specs in build-arch. * Rediff 006_tailor_pt_BR.UTF-8_Compose.diff and 015_russian_locale_alias.diff. * Upload to unstable. Checksums-Sha1: 1c5b1ca66537b6061ebdf7bffb04e9bf1ef0465f 2519 libx11_1.4.99.901-1.dsc 4ac5acf2e1bf87f0aa6873518b5e6952e1767476 3058184 libx11_1.4.99.901.orig.tar.gz 0433581eae39634a844b3e629b20fe773775bb09 82601 libx11_1.4.99.901-1.diff.gz aa82fd36eef5699a74ef3845c7be88fa1de3a3a1 186314 libx11-data_1.4.99.901-1_all.deb e06acbf5b66da1b63af1df3c2de43c27230cf6be 3177136 libx11-doc_1.4.99.901-1_all.deb 52540ac6209e52d9c9b6718eac13787bece3ed11 897750 libx11-6_1.4.99.901-1_amd64.deb e5acecbe76ef7b16934a2de16e8d68d01bc42298 760624 libx11-6-udeb_1.4.99.901-1_amd64.udeb c511ef00080189938ff7dbbf7cd2708a31d3d9c8 2880766 libx11-6-dbg_1.4.99.901-1_amd64.deb 1396f09399c59c1011264abb7ea285dac0c6adf1 1032756 libx11-dev_1.4.99.901-1_amd64.deb efcc62d068974c09bf4f37d9670445b716a1dcdc 137234 libx11-xcb1_1.4.99.901-1_amd64.deb 2da01fe4cec551965b24a58f09a384e39e0b1818 150984 libx11-xcb1-dbg_1.4.99.901-1_amd64.deb 3c64f7e6d94a78b42ad3bbf30ae4f0c2b7500f38 139316 libx11-xcb-dev_1.4.99.901-1_amd64.deb Checksums-Sha256: a9e38c28edff245803c9e1b9c75b3eb0808336b38f9017d558c88b987085768e 2519 libx11_1.4.99.901-1.dsc 8a692cea73b9b4275990b00f871ea1a2ad0818fea65bb0f34819c6a442d68a10 3058184 libx11_1.4.99.901.orig.tar.gz 95580ded45a62f68f90077fb8ac05b088f9d68ab979386c7dee78ddb085aedf7 82601 libx11_1.4.99.901-1.diff.gz 47eac69ab0482d3e6dcb1e7da051649b127bec3d692bbaea89b0e5ba92ce4211 186314 libx11-data_1.4.99.901-1_all.deb 6af1b1c8caf8a8117f83688eb13aa92f55ca9ef99bfa40960a1cce5cc960aa64 3177136 libx11-doc_1.4.99.901-1_all.deb 0ba06d8d097e07627c9de0549ea6c168d94768085c18b86908e18580fe99cbe7 897750 libx11-6_1.4.99.901-1_amd64.deb c1b9a5c836fd88c16357758f14b769c8e4550e02cad2bfefb69fc0f51825695c 760624 libx11-6-udeb_1.4.99.901-1_amd64.udeb a0ad69ba6f9a7a0bec0b6fd8adb192a0b659eb9721046bda55e31f3f3c79c676 2880766 libx11-6-dbg_1.4.99.901-1_amd64.deb b7e855cc0e9f3f090b363ed8dce3cc8d7668cb020e13ae105cf3f1788a3db188 1032756 libx11-dev_1.4.99.901-1_amd64.deb ccb7f3acb8ae13186492737719e216f69c9ea95651a26684f006a4e7120cb448 137234 libx11-xcb1_1.4.99.901-1_amd64.deb 2a23f7474178b27de842d60d6729d90d47554027a6f6a2fb4ffc2c6338834b94 150984 libx11-xcb1-dbg_1.4.99.901-1_amd64.deb 9cc20bd0ea7ee251be24581aa7e548cf744465f2d8a9b2514137c0d1bbb6a3ee 139316 libx11-xcb-dev_1.4.99.901-1_amd64.deb Files: 8d6b85144e1d77d6f0383b785211f4d1 2519 x11 optional libx11_1.4.99.901-1.dsc 1616ebf449af7152acd81f0a6bedf2f3 3058184 x11 optional libx11_1.4.99.901.orig.tar.gz d66abf259929d27a059087c370b4f27d 82601 x11 optional libx11_1.4.99.901-1.diff.gz d460d9f39c7bb7eabbbaf00471cc7477 186314 x11 optional libx11-data_1.4.99.901-1_all.deb 4f3c38565980f8e579d86a7e4a24298b 3177136 doc optional libx11-doc_1.4.99.901-1_all.deb 630f9942c5a9cc410a1f27c87dbf02fc 897750 libs optional libx11-6_1.4.99.901-1_amd64.deb ed5a5d8f1afcff30d9d23f56ba5d2b6e 760624 debian-installer optional libx11-6-udeb_1.4.99.901-1_amd64.udeb cd1da753b6ecbe1e73051cbd1d9898f6 2880766 debug extra libx11-6-dbg_1.4.99.901-1_amd64.deb 6b6bda7d30b772e155a37d6b9c55001b 1032756 libdevel optional libx11-dev_1.4.99.901-1_amd64.deb 07199a2eab543af9e0f38550cf79e102 137234 libs optional libx11-xcb1_1.4.99.901-1_amd64.deb 63a079a559193ed7a6afa8209c9d43c2 150984 debug extra libx11-xcb1-dbg_1.4.99.901-1_amd64.deb fa0e743a316f31d823a59a1f08fe5905 139316 libdevel optional libx11-xcb-dev_1.4.99.901-1_amd64.deb Package-Type: udeb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJPkIEmAAoJEDEBgAUJBeQMu74P/RDkVVdaHfdfYcymu33f43Hc nX6dPgWzAcZF46pHW0LXuonaVza22FVKYp0OwXqdfYL5DfQB/Ny4GWB/VhL1RMZS xjaYC6eQtZlZbMi0qD9UjUYWyFi+szwfkbYvZh/HtdErZHRuFao20fg5RGBCcx7j 8O8yEDe+iCuf2erwJP9ym5qTTWvoWe/VA/TwhzXcu90EKkumYib8GA9SdOR260iR YXDHUnxZZfsKDMUhP+whgeupJq1S/kSNry1HlYN5CnvBcYHDn8OorCOKnFz74tSc KqoJXXsDK4veGOfPZ5YIoZSjXb4S7uO5Pe3JZJ6REFCMfMoKHxy/LbK12KqH8r9H dks7UCcCnT2A8sxgMxEd3urvIdGI0vUGQnpsRVTepPtN8+92TkpszuIBg8N/eOzJ MQ2z8QbLNv4td9kAzZ9c4yDqC8wqHgtu0DcHqzpl+GdPvV93cAvQYD9pl+szozGJ J+snUQ/VN5ezCnBb3Vcg7q78TKf/2DW9tBhYR8UGIfixZJNN0P+MDMytEPKSf9Nh J7c0KOPMRYj2prDU9aSGsSSs2RxRdly7epUUnpJSbUBT7CDOwEWgApqmzYlBnB3I KFMAyHYBhQ2nZNxahcRPr206BVGbWyJkerMBUPZL7BtgzE7FEqRBdQqzhJl6tlC/ jmS1ZSPfV0oj40kqbsbu =Z+Ix -----END PGP SIGNATURE-----
--- End Message ---