# ChangeLog for x11-libs/openmotif
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/ChangeLog,v 1.157 2008/02/21 17:24:08 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/ChangeLog,v 1.158 2008/02/23 19:11:23 ulm Exp $
+
+ 23 Feb 2008; Ulrich Mueller <ulm@gentoo.org>
+ -files/openmotif-2.2.3-CAN-2004-0687-0688.patch,
+ -files/openmotif-2.2.3-CAN-2004-0914_sec8.patch,
+ -files/openmotif-2.2.3-XmResizeHashTable.patch,
+ -files/openmotif-2.2.3-automake.patch,
+ -files/openmotif-2.2.3-char_not_supported.patch,
+ -files/openmotif-2.2.3-mwm-configdir.patch,
+ -files/openmotif-2.2.3-no_demos.patch,
+ -files/openmotif-2.2.3-pixel_length.patch,
+ -files/openmotif-2.2.3-popup_timeout.patch,
+ -files/openmotif-2.2.3-uil.patch, -files/openmotif-2.2.3-utf8.patch,
+ -files/CAN-2005-0605.patch, openmotif-2.2.3-r9.ebuild:
+ Move old patches off to mirrors.
21 Feb 2008; Ulrich Mueller <ulm@gentoo.org> openmotif-2.3.0-r1.ebuild:
Add message about unslotting and backwards compatibility to pkg_postinst.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-AUX CAN-2005-0605.patch 1118 RMD160 56a1a4433bb71d54b6d5df33fab68aca74158730 SHA1 f9198a5629998790c2dfd112f71134f39f4b3e11 SHA256 20517fc5c4b61419528b658422fdcc9ed972762cffd605a844a4cfd1f628a331
AUX Mwm.defaults 536 RMD160 99fc40c2e923b53a14b2911c37064f2c9cd3f63b SHA1 ddbe7ab7af3a8caf6ccb9d6ab2c721ce5940edd1 SHA256 5373d8c7bd5460ce83bda99f08725fe9154cd4b5ca2b0698e5a0fda10e50f250
AUX motif-config-2.3 1522 RMD160 20835773f46a8ac434385b89764b713d13d06b5c SHA1 da8e1cc36d94fc3c3b54567d82ae35e83e13a02c SHA256 afb2e7b53f6a39b01b153985d12c4e674c6a2714219597b3b599f443242fdc76
-AUX openmotif-2.2.3-CAN-2004-0687-0688.patch 13114 RMD160 ff21f6f69e008737a445e974e2604b503cb4cbbd SHA1 37df674455734c730d7eae9db630fd8656420d2f SHA256 217db5425a1da21206fe6058f4a3ccf312870c0f7c90678b399f313edddf7545
-AUX openmotif-2.2.3-CAN-2004-0914_sec8.patch 491 RMD160 e48a0bf2c7576f9c641ad1f3ef013d4875e5c736 SHA1 7f4e9a65ed8b2a93baa36f3a6a798a6cb907db90 SHA256 6a2ea6dc149b31b77716fd23a32ea704e8f67a5287a8ef8e8c55624986193236
-AUX openmotif-2.2.3-XmResizeHashTable.patch 183 RMD160 19df6e6eed3b9a90797b38852f43e4e1b244be99 SHA1 20862472fccad7aaa068ffe5be9361ee3a13542e SHA256 23a4d23b21b81aa5eba5da8d999073e87636e60d493ec42f2cae96929dcd9b33
-AUX openmotif-2.2.3-automake.patch 275 RMD160 e4a2e883e43cc80a092691518c9a293281238bf8 SHA1 245d19e2efcbc9df12e037334c9b5b1cda2e0ad1 SHA256 dc1a479ad8aafe67fa9e4e673e38bf89ad1ec5d1124acca008125dc01c3af7eb
-AUX openmotif-2.2.3-char_not_supported.patch 1014 RMD160 dbbcccf576674ded138ab03a478893379a21d68c SHA1 c47633a22c4d415c92dd5682470f29572c4c6696 SHA256 d0ec8c7a46ba400512e942c4cd687ed4b48feb656cf54093c4d7f2a506009e02
-AUX openmotif-2.2.3-mwm-configdir.patch 1549 RMD160 e42d08b16625b188feadad26ef33b75679d31bbf SHA1 31e6ca92957e378a0226aea43b25397cbece6748 SHA256 e917e9dda8ae1a331075206d24f535cdd7d3523c57525a94d1e0b60affd70053
-AUX openmotif-2.2.3-no_demos.patch 3803 RMD160 76520548a9a45b7d90eaa675f3b406aad9b4e920 SHA1 d140b37adbf568514b6c68e5c4d476add3f6fea3 SHA256 b6ff9b9cfb0a6165ce46f4fb0987bdc87cddd52d84b3fb12166688bfc7e3f6a6
-AUX openmotif-2.2.3-pixel_length.patch 450 RMD160 398b297d6e83cae2865bfdc14eb32204e47eccf9 SHA1 7f84d79b33284526bdc76fc2a3ba363baa0a1f78 SHA256 806d2110c5a87011c476314c916c089572777874fb402da26d4159625c3dec27
-AUX openmotif-2.2.3-popup_timeout.patch 359 RMD160 812b804bf85deea3fce7908530fc535ee5242142 SHA1 e2fa4b58c3232fab016d4a354ef4049d4c846c6e SHA256 5cb56bbdef8dbb511b259ffdbb9c213abeded8159ed4ca21909e6b8e7cb69322
-AUX openmotif-2.2.3-uil.patch 10746 RMD160 7ce99bde4d98bfb8cf023d123e2a41a25166b1d9 SHA1 4a38a9a3056285f067b948423f1c258ed590dff6 SHA256 6770e481633c0910ac2f901551962c0e58a59c8a80df70bff1e2378fe8d3e56d
-AUX openmotif-2.2.3-utf8.patch 2979 RMD160 4f362ddd7f4e40233faa4862ef796a1c1a9fe7a0 SHA1 7ba9f6cba69c48b9d07d1b966abe7ef24f247dc0 SHA256 2a024df6a28baf0b0bc03763ecbee512554199bfcf1cee87c0f91da8d8482dcd
AUX openmotif-2.3.0-sensitivity-invisible.patch 7202 RMD160 255895bc7fa43079259de0e0e01262e83dca79f1 SHA1 41732e6c09229dbf8b681b37770a9c46621de84c SHA256 394863dd8b3adb67df78593a78cd04ec6eb7ddda3b70d27fd63f550341de07b9
DIST openMotif-2.2.3.tar.gz 5149785 RMD160 b99230d508da57bca72b6920d28fce4187bf5179 SHA1 c463653d9f8e24b35522c3ba6363ddf7a282eab4 SHA256 12fc0d1de53ff30307603e31826db9b63a442f6f743451aed2cb7cedb038d3d9
-DIST openmotif-2.2.3-CAN-2004-0914-newer.patch.bz2 11986 RMD160 f04ccc46b82782d53e30c6a08475353ae8a1d4ad SHA1 7b67f9849ab315466fd3942079b2e39df7a05eb0 SHA256 89a44c191d3ffcb09bebc2d2c859560af0c93a56300b502cad77d77801f57cd7
+DIST openmotif-2.2.3-patches-1.tar.bz2 19960 RMD160 735931640dfb1d45f331e1015dce2886022c82c0 SHA1 f10752647af3ae3e1fc81b052b836c9db5df22e0 SHA256 9da77097b9960edf763d2b94948739acfecdd41e6959afeeef3799b0872c19d1
DIST openmotif-2.3.0-manual.pdf.tgz 4195259 RMD160 45b1a17a653b01ccf0324e0bc70fd1ef5db5a395 SHA1 1d0f55928ad65ee321564ba962b1608cfd83bb96 SHA256 49692fd4d5441d2dbb5ca36199b209c8503452fda9b36e929d1aa3673bffaecb
DIST openmotif-2.3.0.tar.gz 5661471 RMD160 317c8d13d59c6fdd4a9f0e3b63000695f6677b6c SHA1 efb5f5fdc4cc43ef6065594f4ebe98953b7af15e SHA256 81d63e4145fab729621cba38bb0e88fccfbcbb5918473319e9b01a6fbe909544
-EBUILD openmotif-2.2.3-r9.ebuild 3665 RMD160 ff360947f706ae39ef3324a839427c9763700621 SHA1 5135beaf45008d74e937dbc133e3cd5a279fcfd3 SHA256 39e9f2336b0a0469108757436a5bd6dcc88cd0f28912009b75831f84c3a14b1a
+EBUILD openmotif-2.2.3-r9.ebuild 3087 RMD160 9abe07e3f2c6d29b284c0a8460c17feca5cbf459 SHA1 7974f28219210a7ca4de6f24f3c8f5db6f208d30 SHA256 4dccc8fb8e3032a2453ba4e8919d40d2fa820b926301e3914cc0a52e614b96ed
EBUILD openmotif-2.3.0-r1.ebuild 3807 RMD160 bdae67fd975ea3db2267b8941703069ce3fbd97e SHA1 01021281e9d908eea63383aae4cdf6b0a48863c5 SHA256 a97792bf40a1614af0e1a7f5a25840a50080e6a84f7824be1d99227068703dea
EBUILD openmotif-2.3.0.ebuild 3215 RMD160 897d14313b0ad956bc1c549a962723ebe32649dd SHA1 9ff7aceee3e435010feb085215209fd1ee7b0e4e SHA256 8208aa62cb2bc44a4145c11db93dd7eb4f5af36d15c5539c4f36dc54e5907e5e
-MISC ChangeLog 24451 RMD160 28241d474b744b646e814a766abb4862e05c26c2 SHA1 d6dc72ee6e831ba17329ffa987c11beee712580c SHA256 42eb9b230b2aee3524fd977eb464c0367f776c83999368122506694525715ac7
+MISC ChangeLog 25084 RMD160 3bf8969ad3d3935db7240bca3b5046ee24b37d39 SHA1 f2d23a632247f6cbbe4b6a53898fc87138fb8dce SHA256 8b8819e340efa337a693799ca6f7b0d24664f1e12287023dc66bc1921c1110de
MISC metadata.xml 160 RMD160 d86217bb48cf4283e08e43bcaabbc919101ad795 SHA1 d6147d00f16e8cfeef893d0764b0675a93d62849 SHA256 56fca1e06f6dcbe3bc12e7d3962998c7cb79d74f218ce8a17b07771b3e06f49e
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
-iEYEARECAAYFAke9s6wACgkQOeoy/oIi7uyqmgCfU0GY0slsHQxq3Ym4E8CEeQnc
-jiQAoIBvv9iLAfGbXGxxWC7DEEAotZHB
-=6eCK
+iEYEARECAAYFAkfAb7kACgkQOeoy/oIi7uxgagCgi0Zgsnf6cG7rfdh3qq1JxTS8
+vAQAnixCdh7MuN+ezasNi+iOvWyHgTiI
+=M4CL
-----END PGP SIGNATURE-----
+++ /dev/null
---- lib/Xm/Xpmscan.c.orig 2005-03-02 17:00:16.415070960 +0100
-+++ lib/Xm/Xpmscan.c 2005-03-02 17:01:38.949709879 +0100
-@@ -672,8 +672,8 @@
- char *dst;
- unsigned int *iptr;
- char *data;
-- unsigned int x, y, i;
-- int bits, depth, ibu, ibpp, offset;
-+ unsigned int x, y;
-+ int bits, depth, ibu, ibpp, offset, i;
- unsigned long lbt;
- Pixel pixel, px;
-
-@@ -684,6 +684,9 @@
- ibpp = image->bits_per_pixel;
- offset = image->xoffset;
-
-+ if (image->bitmap_unit < 0)
-+ return (XpmNoMemory);
-+
- if ((image->bits_per_pixel | image->depth) == 1) {
- ibu = image->bitmap_unit;
- for (y = 0; y < height; y++)
---- lib/Xm/Xpmcreate.c.orig 2005-03-02 17:02:00.626412844 +0100
-+++ lib/Xm/Xpmcreate.c 2005-03-02 17:02:35.183562480 +0100
-@@ -1265,10 +1265,10 @@
- register char *src;
- register char *dst;
- register unsigned int *iptr;
-- register unsigned int x, y, i;
-+ register unsigned int x, y;
- register char *data;
- Pixel pixel, px;
-- int nbytes, depth, ibu, ibpp;
-+ int nbytes, depth, ibu, ibpp, i;
-
- data = image->data;
- iptr = pixelindex;
+++ /dev/null
---- openMotif-2.2.3/lib/Xm/Xpmhashtab.c.CAN-2004-0687-0688 2004-09-30 11:52:40.176933831 +0200
-+++ openMotif-2.2.3/lib/Xm/Xpmhashtab.c 2004-09-30 11:53:47.288717782 +0200
-@@ -141,7 +141,7 @@
- xpmHashTable *table;
- {
- xpmHashAtom *atomTable = table->atomTable;
-- int size = table->size;
-+ unsigned int size = table->size;
- xpmHashAtom *t, *p;
- int i;
- int oldSize = size;
-@@ -150,6 +150,8 @@
- HASH_TABLE_GROWS
- table->size = size;
- table->limit = size / 3;
-+ if (size >= SIZE_MAX / sizeof(*atomTable))
-+ return (XpmNoMemory);
- atomTable = (xpmHashAtom *) XpmMalloc(size * sizeof(*atomTable));
- if (!atomTable)
- return (XpmNoMemory);
-@@ -210,6 +212,8 @@
- table->size = INITIAL_HASH_SIZE;
- table->limit = table->size / 3;
- table->used = 0;
-+ if (table->size >= SIZE_MAX / sizeof(*atomTable))
-+ return (XpmNoMemory);
- atomTable = (xpmHashAtom *) XpmMalloc(table->size * sizeof(*atomTable));
- if (!atomTable)
- return (XpmNoMemory);
---- openMotif-2.2.3/lib/Xm/XpmWrFFrI.c.CAN-2004-0687-0688 2004-09-30 11:36:04.545969020 +0200
-+++ openMotif-2.2.3/lib/Xm/XpmWrFFrI.c 2004-09-30 11:37:14.583312219 +0200
-@@ -244,6 +244,8 @@
- unsigned int x, y, h;
-
- h = height - 1;
-+ if (cpp != 0 && width >= (SIZE_MAX - 3)/cpp)
-+ return (XpmNoMemory);
- p = buf = (char *) XpmMalloc(width * cpp + 3);
- if (!buf)
- return (XpmNoMemory);
---- openMotif-2.2.3/lib/Xm/Xpmdata.c.CAN-2004-0687-0688 2004-09-30 11:51:30.712472999 +0200
-+++ openMotif-2.2.3/lib/Xm/Xpmdata.c 2004-09-30 11:52:26.665789239 +0200
-@@ -376,7 +376,7 @@
- {
- if (!mdata->type)
- *cmt = NULL;
-- else if (mdata->CommentLength) {
-+ else if (mdata->CommentLength != 0 && mdata->CommentLength < SIZE_MAX - 1) {
- *cmt = (char *) XpmMalloc(mdata->CommentLength + 1);
- strncpy(*cmt, mdata->Comment, mdata->CommentLength);
- (*cmt)[mdata->CommentLength] = '\0';
---- openMotif-2.2.3/lib/Xm/XpmI.h.CAN-2004-0687-0688 2004-09-30 11:38:09.358760225 +0200
-+++ openMotif-2.2.3/lib/Xm/XpmI.h 2004-09-30 11:39:58.498714150 +0200
-@@ -179,6 +179,18 @@
- boundCheckingCalloc((long)(nelem),(long) (elsize))
- #endif
-
-+#if defined(SCO) || defined(__USLC__)
-+#include <stdint.h> /* For SIZE_MAX */
-+#endif
-+#include <limits.h>
-+#ifndef SIZE_MAX
-+# ifdef ULONG_MAX
-+# define SIZE_MAX ULONG_MAX
-+# else
-+# define SIZE_MAX UINT_MAX
-+# endif
-+#endif
-+
- #define XPMMAXCMTLEN BUFSIZ
- typedef struct {
- unsigned int type;
-@@ -276,9 +288,9 @@
- } *xpmHashAtom;
-
- typedef struct {
-- int size;
-- int limit;
-- int used;
-+ unsigned int size;
-+ unsigned int limit;
-+ unsigned int used;
- xpmHashAtom *atomTable;
- } xpmHashTable;
-
---- openMotif-2.2.3/lib/Xm/XpmCrDatFrI.c.CAN-2004-0687-0688 2004-09-30 11:35:18.058379165 +0200
-+++ openMotif-2.2.3/lib/Xm/XpmCrDatFrI.c 2004-09-30 11:35:43.951808698 +0200
-@@ -134,6 +134,8 @@
- */
- header_nlines = 1 + image->ncolors;
- header_size = sizeof(char *) * header_nlines;
-+ if (header_size >= SIZE_MAX / sizeof(char *))
-+ return (XpmNoMemory);
- header = (char **) XpmCalloc(header_size, sizeof(char *));
- if (!header)
- return (XpmNoMemory);
---- openMotif-2.2.3/lib/Xm/Xpmscan.c.CAN-2004-0687-0688 2004-09-30 12:05:34.424607695 +0200
-+++ openMotif-2.2.3/lib/Xm/Xpmscan.c 2004-09-30 12:08:16.963282178 +0200
-@@ -98,7 +98,8 @@
- LFUNC(ScanTransparentColor, int, (XpmColor *color, unsigned int cpp,
- XpmAttributes *attributes));
-
--LFUNC(ScanOtherColors, int, (Display *display, XpmColor *colors, int ncolors,
-+LFUNC(ScanOtherColors, int, (Display *display, XpmColor *colors,
-+ unsigned int ncolors,
- Pixel *pixels, unsigned int mask,
- unsigned int cpp, XpmAttributes *attributes));
-
-@@ -225,11 +226,17 @@
- else
- cpp = 0;
-
-+ if ((height > 0 && width >= SIZE_MAX / height) ||
-+ width * height >= SIZE_MAX / sizeof(unsigned int))
-+ RETURN(XpmNoMemory);
- pmap.pixelindex =
- (unsigned int *) XpmCalloc(width * height, sizeof(unsigned int));
- if (!pmap.pixelindex)
- RETURN(XpmNoMemory);
-
-+ if (pmap.size >= SIZE_MAX / sizeof(Pixel))
-+ RETURN(XpmNoMemory);
-+
- pmap.pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * pmap.size);
- if (!pmap.pixels)
- RETURN(XpmNoMemory);
-@@ -285,6 +292,8 @@
- * color
- */
-
-+ if (pmap.ncolors >= SIZE_MAX / sizeof(XpmColor))
-+ RETURN(XpmNoMemory);
- colorTable = (XpmColor *) XpmCalloc(pmap.ncolors, sizeof(XpmColor));
- if (!colorTable)
- RETURN(XpmNoMemory);
-@@ -332,6 +341,8 @@
-
- /* first get a character string */
- a = 0;
-+ if (cpp >= SIZE_MAX - 1)
-+ return (XpmNoMemory);
- if (!(s = color->string = (char *) XpmMalloc(cpp + 1)))
- return (XpmNoMemory);
- *s++ = printable[c = a % MAXPRINTABLE];
-@@ -379,7 +390,7 @@
- ScanOtherColors(display, colors, ncolors, pixels, mask, cpp, attributes)
- Display *display;
- XpmColor *colors;
-- int ncolors;
-+ unsigned int ncolors;
- Pixel *pixels;
- unsigned int mask;
- unsigned int cpp;
-@@ -423,6 +434,8 @@
- }
-
- /* first get character strings and rgb values */
-+ if (ncolors >= SIZE_MAX / sizeof(XColor) || cpp >= SIZE_MAX - 1)
-+ return (XpmNoMemory);
- xcolors = (XColor *) XpmMalloc(sizeof(XColor) * ncolors);
- if (!xcolors)
- return (XpmNoMemory);
---- openMotif-2.2.3/lib/Xm/XpmAttrib.c.CAN-2004-0687-0688 2004-09-30 11:33:10.216008908 +0200
-+++ openMotif-2.2.3/lib/Xm/XpmAttrib.c 2004-09-30 11:33:41.187737616 +0200
-@@ -41,8 +41,8 @@
- #include "XpmI.h"
-
- /* 3.2 backward compatibility code */
--LFUNC(CreateOldColorTable, int, (XpmColor *ct, int ncolors,
-- XpmColor ***oldct));
-+LFUNC(CreateOldColorTable, int, (XpmColor *ct, unsigned int ncolors,
-+ XpmColor ***oldct));
-
- LFUNC(FreeOldColorTable, void, (XpmColor **colorTable, int ncolors));
-
-@@ -52,12 +52,15 @@
- static int
- CreateOldColorTable(ct, ncolors, oldct)
- XpmColor *ct;
-- int ncolors;
-+ unsigned int ncolors;
- XpmColor ***oldct;
- {
- XpmColor **colorTable, **color;
- int a;
-
-+ if (ncolors >= SIZE_MAX / sizeof(XpmColor *))
-+ return XpmNoMemory;
-+
- colorTable = (XpmColor **) XpmMalloc(ncolors * sizeof(XpmColor *));
- if (!colorTable) {
- *oldct = NULL;
---- openMotif-2.2.3/lib/Xm/Xpmcreate.c.CAN-2004-0687-0688 2004-09-30 11:40:22.122457590 +0200
-+++ openMotif-2.2.3/lib/Xm/Xpmcreate.c 2004-09-30 12:49:44.411019183 +0200
-@@ -804,6 +804,9 @@
-
- ErrorStatus = XpmSuccess;
-
-+ if (image->ncolors >= SIZE_MAX / sizeof(Pixel))
-+ return (XpmNoMemory);
-+
- /* malloc pixels index tables */
- image_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * image->ncolors);
- if (!image_pixels)
-@@ -947,6 +950,8 @@
- return (XpmNoMemory);
-
- #ifndef FOR_MSW
-+ if (height != 0 && (*image_return)->bytes_per_line >= SIZE_MAX / height)
-+ return XpmNoMemory;
- /* now that bytes_per_line must have been set properly alloc data */
- (*image_return)->data =
- (char *) XpmMalloc((*image_return)->bytes_per_line * height);
-@@ -1992,6 +1997,9 @@
- xpmGetCmt(data, &colors_cmt);
-
- /* malloc pixels index tables */
-+ if (ncolors >= SIZE_MAX / sizeof(Pixel))
-+ return XpmNoMemory;
-+
- image_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * ncolors);
- if (!image_pixels)
- RETURN(XpmNoMemory);
-@@ -2207,6 +2215,9 @@
- {
- unsigned short colidx[256];
-
-+ if (ncolors > 256)
-+ return (XpmFileInvalid);
-+
- bzero((char *)colidx, 256 * sizeof(short));
- for (a = 0; a < ncolors; a++)
- colidx[(unsigned char)colorTable[a].string[0]] = a + 1;
-@@ -2305,6 +2316,9 @@
- char *s;
- char buf[BUFSIZ];
-
-+ if (cpp >= sizeof(buf))
-+ return (XpmFileInvalid);
-+
- buf[cpp] = '\0';
- if (USE_HASHTABLE) {
- xpmHashAtom *slot;
---- openMotif-2.2.3/lib/Xm/Xpmparse.c.CAN-2004-0687-0688 2004-09-30 11:54:01.219804716 +0200
-+++ openMotif-2.2.3/lib/Xm/Xpmparse.c 2004-09-30 12:47:15.676480282 +0200
-@@ -46,6 +46,25 @@
-
- #include "XpmI.h"
- #include <ctype.h>
-+#include <string.h>
-+
-+#ifdef HAS_STRLCAT
-+# define STRLCAT(dst, src, dstsize) { \
-+ if (strlcat(dst, src, dstsize) >= (dstsize)) \
-+ return (XpmFileInvalid); }
-+# define STRLCPY(dst, src, dstsize) { \
-+ if (strlcpy(dst, src, dstsize) >= (dstsize)) \
-+ return (XpmFileInvalid); }
-+#else
-+# define STRLCAT(dst, src, dstsize) { \
-+ if ((strlen(dst) + strlen(src)) < (dstsize)) \
-+ strcat(dst, src); \
-+ else return (XpmFileInvalid); }
-+# define STRLCPY(dst, src, dstsize) { \
-+ if (strlen(src) < (dstsize)) \
-+ strcpy(dst, src); \
-+ else return (XpmFileInvalid); }
-+#endif
-
- LFUNC(ParsePixels, int, (xpmData *data, unsigned int width,
- unsigned int height, unsigned int ncolors,
-@@ -215,7 +234,7 @@
- unsigned int *extensions;
- {
- unsigned int l;
-- char buf[BUFSIZ];
-+ char buf[BUFSIZ + 1];
-
- if (!data->format) { /* XPM 2 or 3 */
-
-@@ -324,10 +343,10 @@
- XpmColor **colorTablePtr;
- xpmHashTable *hashtable;
- {
-- unsigned int key, l, a, b;
-+ unsigned int key, l, a, b, len;
- unsigned int curkey; /* current color key */
- unsigned int lastwaskey; /* key read */
-- char buf[BUFSIZ];
-+ char buf[BUFSIZ + 1];
- char curbuf[BUFSIZ]; /* current buffer */
- char **sptr, *s;
- XpmColor *color;
-@@ -335,6 +354,8 @@
- char **defaults;
- int ErrorStatus;
-
-+ if (ncolors >= SIZE_MAX / sizeof(XpmColor))
-+ return (XpmNoMemory);
- colorTable = (XpmColor *) XpmCalloc(ncolors, sizeof(XpmColor));
- if (!colorTable)
- return (XpmNoMemory);
-@@ -346,6 +367,10 @@
- /*
- * read pixel value
- */
-+ if (cpp >= SIZE_MAX - 1) {
-+ xpmFreeColorTable(colorTable, ncolors);
-+ return (XpmNoMemory);
-+ }
- color->string = (char *) XpmMalloc(cpp + 1);
- if (!color->string) {
- xpmFreeColorTable(colorTable, ncolors);
-@@ -383,13 +408,14 @@
- }
- if (!lastwaskey && key < NKEYS) { /* open new key */
- if (curkey) { /* flush string */
-- s = (char *) XpmMalloc(strlen(curbuf) + 1);
-+ len = strlen(curbuf) + 1;
-+ s = (char *) XpmMalloc(len);
- if (!s) {
- xpmFreeColorTable(colorTable, ncolors);
- return (XpmNoMemory);
- }
- defaults[curkey] = s;
-- strcpy(s, curbuf);
-+ memcpy(s, curbuf, len);
- }
- curkey = key + 1; /* set new key */
- *curbuf = '\0'; /* reset curbuf */
-@@ -400,9 +426,9 @@
- return (XpmFileInvalid);
- }
- if (!lastwaskey)
-- strcat(curbuf, " "); /* append space */
-+ STRLCAT(curbuf, " ", sizeof(curbuf)); /* append space */
- buf[l] = '\0';
-- strcat(curbuf, buf);/* append buf */
-+ STRLCAT(curbuf, buf, sizeof(curbuf));/* append buf */
- lastwaskey = 0;
- }
- }
-@@ -410,12 +436,13 @@
- xpmFreeColorTable(colorTable, ncolors);
- return (XpmFileInvalid);
- }
-- s = defaults[curkey] = (char *) XpmMalloc(strlen(curbuf) + 1);
-+ len = strlen(curbuf) + 1;
-+ s = defaults[curkey] = (char *) XpmMalloc(len);
- if (!s) {
- xpmFreeColorTable(colorTable, ncolors);
- return (XpmNoMemory);
- }
-- strcpy(s, curbuf);
-+ memcpy(s, curbuf, len);
- }
- } else { /* XPM 1 */
- /* get to the beginning of the first string */
-@@ -428,6 +455,10 @@
- /*
- * read pixel value
- */
-+ if (cpp >= SIZE_MAX - 1) {
-+ xpmFreeColorTable(colorTable, ncolors);
-+ return (XpmNoMemory);
-+ }
- color->string = (char *) XpmMalloc(cpp + 1);
- if (!color->string) {
- xpmFreeColorTable(colorTable, ncolors);
-@@ -456,16 +487,17 @@
- *curbuf = '\0'; /* init curbuf */
- while ((l = xpmNextWord(data, buf, BUFSIZ))) {
- if (*curbuf != '\0')
-- strcat(curbuf, " ");/* append space */
-+ STRLCAT(curbuf, " ", sizeof(curbuf));/* append space */
- buf[l] = '\0';
-- strcat(curbuf, buf); /* append buf */
-+ STRLCAT(curbuf, buf, sizeof(curbuf)); /* append buf */
- }
-- s = (char *) XpmMalloc(strlen(curbuf) + 1);
-+ len = strlen(curbuf) + 1;
-+ s = (char *) XpmMalloc(len);
- if (!s) {
- xpmFreeColorTable(colorTable, ncolors);
- return (XpmNoMemory);
- }
-- strcpy(s, curbuf);
-+ memcpy(s, curbuf, len);
- color->c_color = s;
- *curbuf = '\0'; /* reset curbuf */
- if (a < ncolors - 1)
-@@ -490,6 +522,9 @@
- unsigned int *iptr, *iptr2;
- unsigned int a, x, y;
-
-+ if ((height > 0 && width >= SIZE_MAX / height) ||
-+ width * height >= SIZE_MAX / sizeof(unsigned int))
-+ return XpmNoMemory;
- #ifndef FOR_MSW
- iptr2 = (unsigned int *) XpmMalloc(sizeof(unsigned int) * width * height);
- #else
-@@ -513,6 +548,9 @@
- {
- unsigned short colidx[256];
-
-+ if (ncolors > 256)
-+ return (XpmFileInvalid);
-+
- bzero((char *)colidx, 256 * sizeof(short));
- for (a = 0; a < ncolors; a++)
- colidx[(unsigned char)colorTable[a].string[0]] = a + 1;
-@@ -590,6 +628,9 @@
- char *s;
- char buf[BUFSIZ];
-
-+ if (cpp >= sizeof(buf))
-+ return (XpmFileInvalid);
-+
- buf[cpp] = '\0';
- if (USE_HASHTABLE) {
- xpmHashAtom *slot;
+++ /dev/null
---- openMotif-2.2.3/lib/Xm/XpmWrFFrI.c.CAN-2004-0914_sec8 2004-11-29 15:04:10.105373839 +0100
-+++ openMotif-2.2.3/lib/Xm/XpmWrFFrI.c 2004-11-29 15:04:10.150367679 +0100
-@@ -322,10 +322,7 @@
- #ifndef NO_ZPIPE
- size_t len = strlen(filename);
-
-- if(len == 0 ||
-- filename[0] == '/' ||
-- strstr(filename, "../") != NULL ||
-- filename[len-1] == '/')
-+ if(len == 0)
- return(XpmOpenFailed);
-
- if (len > 2 && !strcmp(".Z", filename + (len - 2))) {
+++ /dev/null
---- lib/Xm/Hash.c
-+++ lib/Xm/Hash.c
-@@ -198,6 +198,8 @@
- } else {
- table -> buckets[index] = current;
- }
-+ } else {
-+ last = current;
- }
- current = next;
- }
+++ /dev/null
---- clients/uil/Makefile.am Fri Aug 15 04:56:19 2003
-+++ clients/uil/Makefile.am.new Tue Feb 8 12:06:15 2005
-@@ -65,6 +65,7 @@
- lib_LTLIBRARIES = libUil.la
-
- libUil_la_SOURCES = $(SRCS)
-+libUil_la_CFLAGS = $(AM_CFLAGS)
-
- libUil_la_DEPENDENCIES = UilDBDef.h UilParser.lo
-
+++ /dev/null
---- openMotif-2.2.3/lib/Xm/TextF.c.char_not_supported 2004-06-03 12:59:10.241822710 +0200
-+++ openMotif-2.2.3/lib/Xm/TextF.c 2004-06-03 13:02:18.987890852 +0200
-@@ -3723,20 +3723,17 @@
- cache_ptr = tmp = XmStackAlloc(buf_size, cache);
-
- tmp_str = (wchar_t *)str;
-- ret_val = wctomb(tmp, *tmp_str);
-+ // Fixed MZ BZ#1257: by Brad Despres <brad@sd.aonix.com>
- count = 0;
-- while ( (ret_val > 0)&& (buf_size >= MB_CUR_MAX) && (count < n) )
-- {
-- count += 1;
-- tmp += ret_val;
-- buf_size -= ret_val;
-- tmp_str++;
-- ret_val = wctomb(tmp, *tmp_str);
-- }
--
-+ do {
-+ ret_val = wctomb(tmp, *tmp_str);
-+ count += 1;
-+ tmp += ret_val;
-+ buf_size -= ret_val;
-+ tmp_str++;
-+ } while ( (ret_val > 0)&& (buf_size >= MB_CUR_MAX) && (count < n) ) ;
- if (ret_val == -1) /* bad character */
- return (False);
--
- is_printable = XTextWidth(TextF_Font(tf), cache_ptr, tmp - cache_ptr);
- XmStackFree(cache_ptr, cache);
- return (is_printable);
+++ /dev/null
-diff -urN openMotif-2.2.2.orig/clients/mwm/WmResParse.c openMotif-2.2.2/clients/mwm/WmResParse.c
---- openMotif-2.2.2.orig/clients/mwm/WmResParse.c 2002-01-10 21:55:37.000000000 +0100
-+++ openMotif-2.2.2/clients/mwm/WmResParse.c 2003-06-04 22:20:22.000000000 +0200
-@@ -2411,7 +2411,7 @@
- if (MwmBehavior)
- {
- strcpy(cfileName, LIBDIR);
-- strncat(cfileName, "/", MAXWMPATH-strlen(cfileName));
-+ strncat(cfileName, "/mwm/", MAXWMPATH-strlen(cfileName));
- strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName));
- strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
- }
-@@ -2427,7 +2427,7 @@
- * Try /$LANG/system.mwmrc within the install tree
- */
- strcpy(cfileName, LIBDIR);
-- strncat(cfileName, "/", MAXWMPATH-strlen(cfileName));
-+ strncat(cfileName, "/mwm/", MAXWMPATH-strlen(cfileName));
- strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName));
- strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
- #endif /* WSM */
-@@ -2449,7 +2449,7 @@
- if (MwmBehavior)
- {
- strcpy(cfileName, LIBDIR);
-- strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
-+ strncat(cfileName, "/mwm" SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
- #ifdef PANELIST
- fileP = fopen (cfileName, "r");
- #else /* PANELIST */
-@@ -2473,7 +2473,7 @@
- * Try /system.mwmrc within the install tree
- */
- strcpy(cfileName, LIBDIR);
-- strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
-+ strncat(cfileName, "/mwm" SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
-
- if (LANG != NULL)
- {
+++ /dev/null
---- openmotif/configure.in.no_demos 2003-09-19 18:40:33.000000000 +0200
-+++ openmotif/configure.in 2003-12-16 12:16:33.000000000 +0100
-@@ -259,88 +259,4 @@
- doc/man/man5/Makefile \
- tools/Makefile \
- tools/wml/Makefile \
--demos/Makefile \
--demos/lib/Makefile \
--demos/lib/Xmd/Makefile \
--demos/lib/Wsm/Makefile \
--demos/lib/Exm/Makefile \
--demos/lib/Exm/wml/Makefile \
--demos/programs/Makefile \
--demos/programs/Exm/Makefile \
--demos/programs/Exm/app_in_c/Makefile \
--demos/programs/Exm/app_in_uil/Makefile \
--demos/programs/Exm/simple_app/Makefile \
--demos/programs/airport/Makefile \
--demos/programs/animate/Makefile \
--demos/programs/drag_and_drop/Makefile \
--demos/programs/draw/Makefile \
--demos/programs/earth/Makefile \
--demos/programs/filemanager/Makefile \
--demos/programs/fileview/Makefile \
--demos/programs/getsubres/Makefile \
--demos/programs/hellomotif/Makefile \
--demos/programs/hellomotifi18n/Makefile \
--demos/programs/hellomotifi18n/C/Makefile \
--demos/programs/hellomotifi18n/C/uid/Makefile \
--demos/programs/hellomotifi18n/english/Makefile \
--demos/programs/hellomotifi18n/english/uid/Makefile \
--demos/programs/hellomotifi18n/french/Makefile \
--demos/programs/hellomotifi18n/french/uid/Makefile \
--demos/programs/hellomotifi18n/hebrew/Makefile \
--demos/programs/hellomotifi18n/hebrew/uid/Makefile \
--demos/programs/hellomotifi18n/japan/Makefile \
--demos/programs/hellomotifi18n/japan/uid/Makefile \
--demos/programs/hellomotifi18n/japanese/Makefile \
--demos/programs/hellomotifi18n/japanese/uid/Makefile \
--demos/programs/hellomotifi18n/swedish/Makefile \
--demos/programs/hellomotifi18n/swedish/uid/Makefile \
--demos/programs/i18ninput/Makefile \
--demos/programs/panner/Makefile \
--demos/programs/periodic/Makefile \
--demos/programs/piano/Makefile \
--demos/programs/popups/Makefile \
--demos/programs/sampler2_0/Makefile \
--demos/programs/setdate/Makefile \
--demos/programs/todo/Makefile \
--demos/programs/workspace/Makefile \
--demos/programs/tooltips/Makefile \
--demos/programs/FontSel/Makefile \
--demos/programs/ButtonBox/Makefile \
--demos/programs/ColorSel/Makefile \
--demos/programs/Column/Makefile \
--demos/programs/DropDown/Makefile \
--demos/programs/MultiList/Makefile \
--demos/programs/MultiList/pixmaps/Makefile \
--demos/programs/IconB/Makefile \
--demos/programs/Outline/Makefile \
--demos/programs/Paned/Makefile \
--demos/programs/TabStack/Makefile \
--demos/programs/Tree/Makefile \
--demos/programs/pixmaps/Makefile \
--demos/unsupported/Makefile \
--demos/unsupported/Exm/Makefile \
--demos/unsupported/aicon/Makefile \
--demos/unsupported/dainput/Makefile \
--demos/unsupported/dogs/Makefile \
--demos/unsupported/hellomotif/Makefile \
--demos/unsupported/motifshell/Makefile \
--demos/unsupported/uilsymdump/Makefile \
--demos/unsupported/xmapdef/Makefile \
--demos/unsupported/xmfonts/Makefile \
--demos/unsupported/xmforc/Makefile \
--demos/unsupported/xmform/Makefile \
--demos/doc/Makefile \
--demos/doc/programGuide/Makefile \
--demos/doc/programGuide/ch05/Makefile \
--demos/doc/programGuide/ch05/Scale/Makefile \
--demos/doc/programGuide/ch06/Makefile \
--demos/doc/programGuide/ch06/spin_box/Makefile \
--demos/doc/programGuide/ch06/combo_box/Makefile \
--demos/doc/programGuide/ch08/Makefile \
--demos/doc/programGuide/ch08/Notebook/Makefile \
--demos/doc/programGuide/ch08/Container/Makefile \
--demos/doc/programGuide/ch16/Makefile \
--demos/doc/programGuide/ch17/Makefile \
--demos/doc/programGuide/ch17/simple_drop/Makefile \
--demos/doc/programGuide/ch17/simple_drag/Makefile \
- ])
---- openmotif/Makefile.am.no_demos 2003-12-16 12:17:02.000000000 +0100
-+++ openmotif/Makefile.am 2003-12-16 12:17:03.000000000 +0100
-@@ -28,6 +28,5 @@
- include \
- tools \
- clients \
-- doc \
-- demos
-+ doc
- AUTOMAKE_OPTIONS = 1.4
+++ /dev/null
---- openMotif-2.2.3/lib/Xm/DataF.c.pixel_length 2004-06-03 15:11:52.932820812 +0200
-+++ openMotif-2.2.3/lib/Xm/DataF.c 2004-06-03 15:12:27.323091126 +0200
-@@ -8648,7 +8648,7 @@
- curr_str++;
- i++;
- } else {
-- wchar_t tmp;
-+ wchar_t tmp[XmTextF_max_char_size(tf)+1];
- int num_conv;
- num_conv = mbtowc(&tmp, curr_str, XmTextF_max_char_size(tf));
- if (num_conv >= 0 && df_FindPixelLength(tf, (char*) &tmp, 1)) {
+++ /dev/null
---- openMotif-2.2.3/lib/Xm/MenuUtil.c.popup_timeout 2002-01-31 15:49:35.000000000 +0100
-+++ openMotif-2.2.3/lib/Xm/MenuUtil.c 2004-06-08 17:14:46.311285603 +0200
-@@ -156,6 +156,9 @@
- cursor, time)) == GrabSuccess)
- break;
-
-+ if (status == GrabInvalidTime)
-+ time = CurrentTime;
-+
- XmeMicroSleep(1000);
- }
- if (status != GrabSuccess)
+++ /dev/null
---- openMotif-2.2.3/lib/Mrm/Mrmhier.c.UIL 2002-01-11 14:56:24.000000000 +0100
-+++ openMotif-2.2.3/lib/Mrm/Mrmhier.c 2005-12-31 07:42:31.485196184 +0100
-@@ -712,7 +712,7 @@
- * Local variables
- */
- Cardinal result; /* function results */
-- char dummy[300]; /* file name (unused) */
-+ char *dummy; /* file name (unused) */
- char err_stg[300];
-
- /*
-@@ -764,11 +764,13 @@
-
- if (resolvedname == 0)
- {
-- sprintf (err_stg, _MrmMMsg_0031, name) ;
-+ snprintf (err_stg, 300, _MrmMMsg_0031, name) ;
- return Urm__UT_Error ("I18NOpenFile", err_stg, NULL, NULL, MrmNOT_FOUND);
- }
-
-+ dummy = XtMalloc(strlen(resolvedname)+1);
- result = UrmIdbOpenFileRead (resolvedname, os_ext, file_id_return, dummy) ;
-+ XtFree(dummy);
- switch ( result )
- {
- case MrmSUCCESS:
---- openMotif-2.2.3/clients/uil/UilIODef.h.UIL 2002-01-04 22:13:33.000000000 +0100
-+++ openMotif-2.2.3/clients/uil/UilIODef.h 2005-12-31 07:42:15.129682600 +0100
-@@ -69,13 +69,18 @@
- #define NULL 0L
- #endif
-
-+#include <X11/Xos.h>
-+#ifndef PATH_MAX
-+# define PATH_MAX 256
-+#endif
-+
- typedef struct
- {
- FILE *az_file_ptr;
- char *c_buffer;
- boolean v_position_before_get;
- z_key last_key;
-- char expanded_name[ 256 ];
-+ char expanded_name[ PATH_MAX ];
- } uil_fcb_type;
-
- #endif /* UilIODef_h */
---- openMotif-2.2.3/clients/uil/UilLstLst.c.UIL 2002-01-10 21:55:43.000000000 +0100
-+++ openMotif-2.2.3/clients/uil/UilLstLst.c 2005-12-31 07:42:19.447026264 +0100
-@@ -164,7 +164,7 @@
- lst_l_page_no = 0;
- lst_v_listing_open = TRUE;
-
-- sprintf(lst_c_title1,
-+ snprintf(lst_c_title1, 132,
- "%s %s \t%s\t\t Page ",
- _host_compiler, _compiler_version,
- current_time(&ctime_buf));
-@@ -270,6 +270,17 @@
- {
- /* place the file name in the expanded_name buffer */
-
-+ if (strlen(Uil_cmd_z_command.ac_listing_file) >= PATH_MAX)
-+ {
-+ char *p;
-+ int len=0;
-+ if((p = rindex(Uil_cmd_z_command.ac_listing_file, '/')) != NULL)
-+ len = strlen(++p);
-+ if(p == NULL || len >= PATH_MAX)
-+ p = "<unknown>";
-+ strcpy(az_fcb->expanded_name, p);
-+ return src_k_open_error;
-+ }
- strcpy(az_fcb->expanded_name, Uil_cmd_z_command.ac_listing_file);
-
- /* open the file */
-@@ -529,7 +540,7 @@
- char buffer [132];
-
- az_fcb = src_az_source_file_table [i];
-- sprintf (buffer,
-+ snprintf (buffer, 132,
- " File (%d) %s",
- i, az_fcb->expanded_name );
- lst_output_line( buffer, FALSE );
-@@ -598,7 +609,7 @@
- }
-
-
-- sprintf(buffer, "%s (%d) %s",
-+ snprintf(buffer, 132, "%s (%d) %s",
- diag_get_message_abbrev( az_msg->l_message_number ),
- msg_no,
- az_msg->c_text);
---- openMotif-2.2.3/clients/uil/UilP2Out.c.UIL 2002-01-10 21:55:44.000000000 +0100
-+++ openMotif-2.2.3/clients/uil/UilP2Out.c 2005-12-31 07:42:23.022482712 +0100
-@@ -189,7 +189,7 @@
- int topmost_index;
- struct
- { MrmOsOpenParam os_param;
-- char result_file[256];
-+ char result_file[PATH_MAX];
- } uid_fcb;
-
-
-@@ -234,15 +234,20 @@
- if (sym_az_module_entry->az_version != NULL)
- module_version = sym_az_module_entry->az_version->value.c_value;
-
-- urm_status = UrmIdbOpenFileWrite
-- ( Uil_cmd_z_command.ac_resource_file,
-- & uid_fcb.os_param,
-- _host_compiler,
-- _compiler_version,
-- module_name,
-- module_version,
-- &out_az_idbfile_id,
-- uid_fcb.result_file );
-+ if (strlen(Uil_cmd_z_command.ac_resource_file) < PATH_MAX)
-+ {
-+ urm_status = UrmIdbOpenFileWrite
-+ ( Uil_cmd_z_command.ac_resource_file,
-+ & uid_fcb.os_param,
-+ _host_compiler,
-+ _compiler_version,
-+ module_name,
-+ module_version,
-+ &out_az_idbfile_id,
-+ uid_fcb.result_file );
-+ } else {
-+ urm_status = MrmFAILURE;
-+ }
-
- if (urm_status != MrmSUCCESS)
- {
-@@ -2961,7 +2966,7 @@
- {
- char buffer[132];
-
-- sprintf(buffer, "while %s encountered %s",
-+ snprintf(buffer, 132, "while %s encountered %s",
- problem,
- Urm__UT_LatestErrorMessage());
-
---- openMotif-2.2.3/clients/uil/UilSrcSrc.c.UIL 2002-01-10 21:55:47.000000000 +0100
-+++ openMotif-2.2.3/clients/uil/UilSrcSrc.c 2005-12-31 07:42:27.176851152 +0100
-@@ -626,11 +626,15 @@
- static unsigned short main_dir_len = 0;
- boolean main_file;
- int i; /* loop index through include files */
-- char buffer[256];
-+ char buffer[PATH_MAX];
-+ int c_file_name_len;
-
-+ az_fcb->az_file_ptr = NULL;
-+ c_file_name_len = strlen(c_file_name);
-
- /* place the file name in the expanded_name buffer */
--
-+ if(c_file_name_len >= PATH_MAX)
-+ return src_k_open_error;
- strcpy(buffer, c_file_name);
-
- /* Determine if this is the main file or an include file. */
-@@ -644,7 +648,7 @@
-
- /* Save the directory info for the main file. */
-
-- for (len = strlen (c_file_name),
-+ for (len = c_file_name_len,
- ptr = & c_file_name [len - 1];
- len > 0; len--, ptr--) {
- if ((* ptr) == '/') {
-@@ -673,9 +677,11 @@
- }
-
- if (!specific_directory) {
-+ if (main_dir_len + c_file_name_len >= PATH_MAX)
-+ goto open_label;
- _move (buffer, main_fcb -> expanded_name, main_dir_len);
- _move (& buffer [main_dir_len],
-- c_file_name, strlen (c_file_name) + 1); /* + NULL */
-+ c_file_name, c_file_name_len + 1); /* + NULL */
- } else {
- strcpy (buffer, c_file_name);
- }
-@@ -695,16 +701,22 @@
-
- for (i = 0; i < Uil_cmd_z_command.include_dir_count; i++) {
- int inc_dir_len;
-+ int need_slash=0;
-
- inc_dir_len = strlen (Uil_cmd_z_command.ac_include_dir[i]);
- if (inc_dir_len == 0) {
- search_user_include = False;
- }
-+ if (Uil_cmd_z_command.ac_include_dir[i][inc_dir_len - 1] != '/')
-+ need_slash=1;
-+ if (inc_dir_len + need_slash + c_file_name_len >= PATH_MAX)
-+ goto open_label;
-+
- _move (buffer, Uil_cmd_z_command.ac_include_dir[i], inc_dir_len);
-
- /* Add '/' if not specified at end of directory */
-
-- if (Uil_cmd_z_command.ac_include_dir[i][inc_dir_len - 1] != '/') {
-+ if (need_slash) {
- buffer [inc_dir_len] = '/';
- inc_dir_len++;
- };
-@@ -723,9 +735,11 @@
-
- /* Look in the default include directory. */
- if (search_user_include) {
-+ if (sizeof(c_include_dir)-1 + c_file_name_len >= PATH_MAX)
-+ goto open_label;
- _move(buffer, c_include_dir, sizeof c_include_dir - 1); /* no NULL */
- _move(&buffer[sizeof c_include_dir - 1],
-- c_file_name, strlen (c_file_name) + 1); /* + NULL */
-+ c_file_name, c_file_name_len + 1); /* + NULL */
-
- /* Open the include file. */
- az_fcb->az_file_ptr = fopen (buffer, "r");
---- openMotif-2.2.3/clients/uil/UilSarMod.c.UIL 2002-01-10 21:55:45.000000000 +0100
-+++ openMotif-2.2.3/clients/uil/UilSarMod.c 2005-12-31 07:42:35.593571616 +0100
-@@ -379,7 +379,7 @@
- */
-
- if (Uil_cmd_z_command.v_listing_file)
-- sprintf(Uil_lst_c_title2,
-+ snprintf(Uil_lst_c_title2, 132,
- "Module: %s",
- name_entry->c_text );
-
-@@ -479,7 +479,7 @@
- */
-
- if (Uil_cmd_z_command.v_listing_file)
-- sprintf(Uil_lst_c_title2,
-+ snprintf(Uil_lst_c_title2, 132,
- "Module: %s \t Version: %s",
- sym_az_module_entry->obj_header.az_name->c_text,
- value_entry->value.c_value );
---- openMotif-2.2.3/clients/uil/UilDiags.c.UIL 2002-01-10 21:55:42.000000000 +0100
-+++ openMotif-2.2.3/clients/uil/UilDiags.c 2005-12-31 07:42:39.273012256 +0100
-@@ -293,12 +293,12 @@
- va_start(ap, l_start_column);
-
- #ifndef NO_MESSAGE_CATALOG
-- vsprintf( msg_buffer,
-+ vsnprintf( msg_buffer, 132,
- catgets(uil_catd, UIL_SET1, msg_cat_table[ message_number ],
- diag_rz_msg_table[ message_number ].ac_text),
- ap );
- #else
-- vsprintf( msg_buffer,
-+ vsnprintf( msg_buffer, 132,
- diag_rz_msg_table[ message_number ].ac_text,
- ap );
- #endif
-@@ -317,13 +317,13 @@
- */
-
- #ifndef NO_MESSAGE_CATALOG
-- sprintf( loc_buffer,
-+ snprintf( loc_buffer, 132,
- catgets(uil_catd, UIL_SET_MISC,
- UIL_MISC_0, "\t\t line: %d file: %s"),
- az_src_rec->w_line_number,
- src_get_file_name( az_src_rec ) );
- #else
-- sprintf( loc_buffer,
-+ snprintf( loc_buffer, 132,
- "\t\t line: %d file: %s",
- az_src_rec->w_line_number,
- src_get_file_name( az_src_rec ) );
-@@ -371,7 +371,7 @@
-
- if (l_start_column != diag_k_no_column)
- #ifndef NO_MESSAGE_CATALOG
-- sprintf(loc_buffer,
-+ snprintf(loc_buffer, 132,
- catgets(uil_catd, UIL_SET_MISC,
- UIL_MISC_1,
- "\t\t line: %d position: %d file: %s"),
-@@ -379,7 +379,7 @@
- l_start_column + 1,
- src_get_file_name( az_src_rec ) );
- #else
-- sprintf(loc_buffer,
-+ snprintf(loc_buffer, 132,
- "\t\t line: %d position: %d file: %s",
- az_src_rec->w_line_number,
- l_start_column + 1,
-@@ -387,13 +387,13 @@
- #endif
- else
- #ifndef NO_MESSAGE_CATALOG
-- sprintf( loc_buffer, catgets(uil_catd, UIL_SET_MISC,
-+ snprintf( loc_buffer, 132, catgets(uil_catd, UIL_SET_MISC,
- UIL_MISC_0,
- "\t\t line: %d file: %s"),
- az_src_rec->w_line_number,
- src_get_file_name( az_src_rec ) );
- #else
-- sprintf( loc_buffer,
-+ snprintf( loc_buffer, 132,
- "\t\t line: %d file: %s",
- az_src_rec->w_line_number,
- src_get_file_name( az_src_rec ) );
---- openMotif-2.2.3/clients/uil/UilSymDef.h.UIL 2002-01-04 22:13:38.000000000 +0100
-+++ openMotif-2.2.3/clients/uil/UilSymDef.h 2005-12-31 07:42:44.106277488 +0100
-@@ -65,6 +65,11 @@
-
- #include <Mrm/MrmPublic.h>
- #include <Xm/Xm.h>
-+#include <X11/Xos.h>
-+#ifndef PATH_MAX
-+# define PATH_MAX 256
-+#endif
-+
-
- /*
- ** constraint check access macro
-@@ -874,10 +879,10 @@
- sym_section_entry_type *sections;
- /* pointer to a section list; this list is all of the sections that */
- /* exist in this include file. */
-- char file_name[255];
-+ char file_name[PATH_MAX];
- /* the file name as specified in the include statement in the UIL */
- /* source. */
-- char full_file_name[255];
-+ char full_file_name[PATH_MAX];
- /* the expanded name for the include file actually opened. */
- } sym_include_file_entry_type;
-
-@@ -894,9 +899,9 @@
- /* common header */
- struct _src_source_record_type *src_record_list;
- /* pointer to a list of source records. */
-- char file_name[255];
-+ char file_name[PATH_MAX];
- /* the main UIL file name as specified on the command line. */
-- char full_file_name[255];
-+ char full_file_name[PATH_MAX];
- /* the expanded name for the main UIL file that was actually */
- /* opened. */
- sym_section_entry_type *sections;
+++ /dev/null
---- openMotif-2.2.3/tools/wml/UilSymCSet.h.utf8 2004-03-04 17:41:48.000000000 +0100
-+++ openMotif-2.2.3/tools/wml/UilSymCSet.h 2004-03-17 12:54:23.000000000 +0100
-@@ -32,6 +32,7 @@
- "JISX0201.1976-0", /* jis_katakana */
- "KSC5601.1987-0", /* ksc_hangul */
- "KSC5601.1987-1", /* ksc_hangul_gr */
-+ "UTF-8", /* utf-8 */
- };
- externaldef(uil_sym_glbl) char **charset_xmstring_names_table =
- charset_xmstring_names_table_vec;
-@@ -66,6 +67,7 @@
- XmSTRING_DIRECTION_L_TO_R, /* jis_katakana */
- XmSTRING_DIRECTION_L_TO_R, /* ksc_hangul */
- XmSTRING_DIRECTION_L_TO_R, /* ksc_hangul_gr */
-+ XmSTRING_DIRECTION_L_TO_R, /* utf-8 */
- };
- externaldef(uil_sym_glbl) unsigned char *charset_writing_direction_table =
- charset_wrdirection_table_vec;
-@@ -100,6 +102,7 @@
- XmSTRING_DIRECTION_L_TO_R, /* jis_katakana */
- XmSTRING_DIRECTION_L_TO_R, /* ksc_hangul */
- XmSTRING_DIRECTION_L_TO_R, /* ksc_hangul_gr */
-+ XmSTRING_DIRECTION_L_TO_R, /* utf-8 */
- };
- externaldef(uil_sym_glbl) unsigned char *charset_parsing_direction_table =
- charset_parsdirection_table_vec;
-@@ -134,6 +137,7 @@
- sym_k_onebyte_charsize, /* jis_katakana */
- sym_k_twobyte_charsize, /* ksc_hangul */
- sym_k_twobyte_charsize, /* ksc_hangul_gr */
-+ sym_k_onebyte_charsize, /* utf-8 */
- };
- externaldef(uil_sym_glbl) unsigned char *charset_character_size_table =
- charset_charsize_table_vec;
-@@ -215,6 +219,7 @@
- "KSC_HANGUL_GL", /* ksc_hangul */
- "KSC_HANGUL_GR", /* ksc_hangul_gr */
- "KSC5601.1987-1", /* ksc_hangul_gr */
-+ "UTF-8", /* utf-8 */
- };
- externaldef(uil_sym_glbl) char **charset_lang_names_table =
- charset_lang_names_table_vec;
-@@ -295,10 +300,11 @@
- sym_k_ksc_hangul_charset,
- sym_k_ksc_hangul_gr_charset,
- sym_k_ksc_hangul_gr_charset,
-+ sym_k_utf8_charset,
- };
- externaldef(uil_sym_glbl) unsigned short int *charset_lang_codes_table =
- charset_lang_codes_table_vec;
- /*
- * The number of entries in charset_lang_..._table tables
- */
--externaldef(uil_sym_glbl) unsigned short int charset_lang_table_max = 72;
-+externaldef(uil_sym_glbl) unsigned short int charset_lang_table_max = 73;
---- openMotif-2.2.3/tools/wml/UilSymGen.h.utf8 2004-03-04 17:41:48.000000000 +0100
-+++ openMotif-2.2.3/tools/wml/UilSymGen.h 2004-03-17 12:54:23.000000000 +0100
-@@ -1417,6 +1417,7 @@
- #define sym_k_jis_katakana_charset 21
- #define sym_k_ksc_hangul_charset 22
- #define sym_k_ksc_hangul_gr_charset 23
-+#define sym_k_utf8_charset 24
-
- /* Define literals for automatic children */
-
---- openMotif-2.2.3/tools/wml/motif.wml.utf8 2003-10-08 23:07:47.000000000 +0200
-+++ openMotif-2.2.3/tools/wml/motif.wml 2004-03-17 12:56:09.000000000 +0100
-@@ -163,6 +163,9 @@
- ksc_hangul_gr
- { XmStringCharsetName = "KSC5601.1987-1";
- CharacterSize = TwoByte; };
-+ utf8
-+ { XmStringCharsetName = "UTF-8"; };
-+
- XmFONTLIST_DEFAULT_TAG
- { FontListElementTag = XmFONTLIST_DEFAULT_TAG; };
-
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/openmotif-2.2.3-r9.ebuild,v 1.16 2007/12/30 16:54:31 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/openmotif-2.2.3-r9.ebuild,v 1.17 2008/02/23 19:11:23 ulm Exp $
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="1.6"
DESCRIPTION="Open Motif"
HOMEPAGE="http://www.motifzone.org/"
SRC_URI="ftp://ftp.motifzone.net/om${PV}/src/${MY_P}.tar.gz
- mirror://gentoo/${P}-CAN-2004-0914-newer.patch.bz2"
+ mirror://gentoo/${P}-patches-1.tar.bz2"
LICENSE="MOTIF"
SLOT="2.2"
cd ${S}
# various patches
- epatch ${FILESDIR}/${P}-mwm-configdir.patch
- epatch ${FILESDIR}/${P}-CAN-2004-0687-0688.patch
- epatch ${WORKDIR}/${P}-CAN-2004-0914-newer.patch
- epatch ${FILESDIR}/${P}-CAN-2004-0914_sec8.patch
- epatch ${FILESDIR}/${P}-char_not_supported.patch
- epatch ${FILESDIR}/${P}-pixel_length.patch
- epatch ${FILESDIR}/${P}-popup_timeout.patch
- epatch ${FILESDIR}/${P}-XmResizeHashTable.patch
- epatch ${FILESDIR}/${P}-utf8.patch
- epatch ${FILESDIR}/${P}-no_demos.patch
- epatch ${FILESDIR}/CAN-2005-0605.patch
- epatch ${FILESDIR}/openmotif-2.2.3-uil.patch
-
- epatch ${FILESDIR}/${P}-automake.patch
+ EPATCH_SUFFIX=patch epatch
# This replaces deprecated, obsoleted and now invalid AC_DEFINE
# with their proper alternatives.