summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Stelling <blubb@gentoo.org>2006-03-05 16:39:49 +0000
committerSimon Stelling <blubb@gentoo.org>2006-03-05 16:39:49 +0000
commit0c0e8fe198de87c2683885f94d1280eb80191caa (patch)
treeee35d0028b76e6ad85002f336e0162650a81a263 /x11-libs
parentmove compressed patches to the mirrors (diff)
downloadhistorical-0c0e8fe198de87c2683885f94d1280eb80191caa.tar.gz
historical-0c0e8fe198de87c2683885f94d1280eb80191caa.tar.bz2
historical-0c0e8fe198de87c2683885f94d1280eb80191caa.zip
move compressed patches to the mirrors
Package-Manager: portage-2.1_pre5-r1
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/openmotif/Manifest130
-rw-r--r--x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0687-0688.patch421
-rw-r--r--x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0687-0688.patch.bz2bin3274 -> 0 bytes
-rw-r--r--x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0914-newer.patch.bz2bin12300 -> 0 bytes
-rw-r--r--x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0914.patch.bz2bin11702 -> 0 bytes
-rw-r--r--x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0687-0688.patch421
-rw-r--r--x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0687-0688.patch.bz2bin3362 -> 0 bytes
-rw-r--r--x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0914-newer.patch.bz2bin11986 -> 0 bytes
-rw-r--r--x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0914.patch.bz2bin11770 -> 0 bytes
9 files changed, 943 insertions, 29 deletions
diff --git a/x11-libs/openmotif/Manifest b/x11-libs/openmotif/Manifest
index 96cac43f6099..3c4a30b5ddbd 100644
--- a/x11-libs/openmotif/Manifest
+++ b/x11-libs/openmotif/Manifest
@@ -1,42 +1,114 @@
-MD5 89c85e4f5cdebc8d161d4dcf1a8f3b5e openmotif-2.2.3-r8.ebuild 3916
-MD5 820298e14c2fe7aa9d83621eb59a75ad openmotif-2.2.3-r3.ebuild 3239
-MD5 0b8526ea0e8fb64a6dafc6108efae24d openmotif-2.2.3-r7.ebuild 3919
-MD5 b4534eeeecf8d1d73e9ee47577bc25e6 openmotif-2.1.30-r13.ebuild 5158
-MD5 c169762695749d5670debf91362355c3 openmotif-2.2.3-r9.ebuild 3918
MD5 a6aa3fec08eebaea7cebabba45758ca0 ChangeLog 17918
-MD5 503ccb1138f9c49f0855884d830988a6 metadata.xml 253
-MD5 cbb60554d94564b84d4960afdbcc2500 openmotif-2.1.30-r9.ebuild 3939
-MD5 ee3a092a933a6393bf14d5d7e6231934 files/openmotif-2.1.30-xpm2.diff 47085
+RMD160 e70d9eed9a9cb6dce997626eaaa19e2289c0b31f ChangeLog 17918
+SHA256 573e8fb997829ec2e42d7737017eec05da8236a555126d7b3b680ff6ef97bb0c ChangeLog 17918
+MD5 b38be118160b49f6b0f9e31d26f01594 files/CAN-2005-0605.patch 1118
+RMD160 56a1a4433bb71d54b6d5df33fab68aca74158730 files/CAN-2005-0605.patch 1118
+SHA256 20517fc5c4b61419528b658422fdcc9ed972762cffd605a844a4cfd1f628a331 files/CAN-2005-0605.patch 1118
+MD5 818d2d673fe5ee323f93b5a66fb1baca files/digest-openmotif-2.1.30-r13 79
+RMD160 f5ef9b4794966fcfbdc6a89061809d1c5cb43d3a files/digest-openmotif-2.1.30-r13 79
+SHA256 ae8228b272976c6cd34cc31b303c3a8f4c5a7986cfd3f3959e5b9b7cd831b230 files/digest-openmotif-2.1.30-r13 79
+MD5 818d2d673fe5ee323f93b5a66fb1baca files/digest-openmotif-2.1.30-r9 79
+RMD160 f5ef9b4794966fcfbdc6a89061809d1c5cb43d3a files/digest-openmotif-2.1.30-r9 79
+SHA256 ae8228b272976c6cd34cc31b303c3a8f4c5a7986cfd3f3959e5b9b7cd831b230 files/digest-openmotif-2.1.30-r9 79
MD5 744ea82c1ac06c88fb0e8c93418d5a6e files/digest-openmotif-2.2.3-r3 68
+RMD160 f20b29068bf8f6b579288535c545e8ea693c9487 files/digest-openmotif-2.2.3-r3 68
+SHA256 c05881215a0fa8f08eb981e3e74b296a7b0bc88255516d94a19ac5d2afa71faa files/digest-openmotif-2.2.3-r3 68
MD5 744ea82c1ac06c88fb0e8c93418d5a6e files/digest-openmotif-2.2.3-r7 68
+RMD160 f20b29068bf8f6b579288535c545e8ea693c9487 files/digest-openmotif-2.2.3-r7 68
+SHA256 c05881215a0fa8f08eb981e3e74b296a7b0bc88255516d94a19ac5d2afa71faa files/digest-openmotif-2.2.3-r7 68
MD5 843f6a0700ae08d17908118bcc778747 files/digest-openmotif-2.2.3-r8 250
+RMD160 d0610ee8ccf7f8450a8744054f984bb28d0dcc73 files/digest-openmotif-2.2.3-r8 250
+SHA256 39a2c0b3de47294c758d0997cf8279de6616ad5e9bcfcda2577a84d65d410219 files/digest-openmotif-2.2.3-r8 250
MD5 843f6a0700ae08d17908118bcc778747 files/digest-openmotif-2.2.3-r9 250
+RMD160 d0610ee8ccf7f8450a8744054f984bb28d0dcc73 files/digest-openmotif-2.2.3-r9 250
+SHA256 39a2c0b3de47294c758d0997cf8279de6616ad5e9bcfcda2577a84d65d410219 files/digest-openmotif-2.2.3-r9 250
+MD5 e8aae28045bdb3b82472dd90c1f55f99 files/openmotif-2.1.30-CAN-2004-0687-0688.patch 12932
+RMD160 9dfda7de44b875839d22680e5431523b62291059 files/openmotif-2.1.30-CAN-2004-0687-0688.patch 12932
+SHA256 bd2c811affb18375c523bdc39049204a7d12d75922a184bad77a5937e80df1b3 files/openmotif-2.1.30-CAN-2004-0687-0688.patch 12932
+MD5 62870f12ebc148c6319223ec659c290f files/openmotif-2.1.30-CAN-2004-0914_sec8.patch 471
+RMD160 a0aabad67c15d11b9cf5464ed855ba7f6338f65d files/openmotif-2.1.30-CAN-2004-0914_sec8.patch 471
+SHA256 e79a59ed3fe6f33d783e675cc4113976625ec8b10b42c580b449a678aa0152fd files/openmotif-2.1.30-CAN-2004-0914_sec8.patch 471
MD5 61fb956ff4bc34bc503cdb2226fd037b files/openmotif-2.1.30-darwin-netbsd.diff 16799
-MD5 339b1b38271b9dfdd8c476429b55787e files/openmotif-2.2.3-pixel_length.patch 450
-MD5 818d2d673fe5ee323f93b5a66fb1baca files/digest-openmotif-2.1.30-r9 79
-MD5 6e392c40eacd6da7718bc94d55914d32 files/openmotif-2.1.30-CAN-2004-0914.patch.bz2 11702
-MD5 e408518ff6768e58a409938c473d23ce files/openmotif-2.2.3-CAN-2004-0687-0688.patch.bz2 3362
+RMD160 04549c9d18b4a0969cfc6bd9ef5099c76288c612 files/openmotif-2.1.30-darwin-netbsd.diff 16799
+SHA256 76b27d33f134328890ac5bcbd1960d4cff5d68272235ecd70646a7499c1bed25 files/openmotif-2.1.30-darwin-netbsd.diff 16799
+MD5 ed2738dd3cbdc87b0800fe9710092d18 files/openmotif-2.1.30-imake-ansi.patch 6554
+RMD160 7c51aebd40221a8aa89ece890629585ac4711945 files/openmotif-2.1.30-imake-ansi.patch 6554
+SHA256 43575ce2a79e4ffb47f34b5a76175839c71ca85413a625fcc60adf3617c84d20 files/openmotif-2.1.30-imake-ansi.patch 6554
+MD5 28350d5dab901ef8cd0dc92e578e3f45 files/openmotif-2.1.30-imake-tmpdir.patch 1083
+RMD160 2d20d4b4158dc53e1fd77d1265cf0fe5eb8992da files/openmotif-2.1.30-imake-tmpdir.patch 1083
+SHA256 44bba8c4736e865d9238669f55a6ba3d564a24f853802e7ae07e644de777efa9 files/openmotif-2.1.30-imake-tmpdir.patch 1083
+MD5 f586e24ce0a2b3eeea25a82c8ec1d3c4 files/openmotif-2.1.30-uil-bad_grammar_fix.diff 832
+RMD160 870240d7bf6f9fd03e78ce938c9cb6e97c577917 files/openmotif-2.1.30-uil-bad_grammar_fix.diff 832
+SHA256 468d79000604b12a24092d1c0ab1190c79682d66715db471b4322c6325140761 files/openmotif-2.1.30-uil-bad_grammar_fix.diff 832
MD5 8aaa33844cae66b12fcdce6b58bfe6df files/openmotif-2.1.30-xpm.diff 13134
+RMD160 866179a8dfa6fc4c95d3845c18b47edcb517b224 files/openmotif-2.1.30-xpm.diff 13134
+SHA256 853a994bc4bc5dacf8d8b3104435361657444a1c791a075abc126d5e844175ad files/openmotif-2.1.30-xpm.diff 13134
+MD5 ee3a092a933a6393bf14d5d7e6231934 files/openmotif-2.1.30-xpm2.diff 47085
+RMD160 eb54e254a92f46064eb06b49b3169c436a7c6d5c files/openmotif-2.1.30-xpm2.diff 47085
+SHA256 3e1548daa09e1eafb2561773cd05c73f70e56d7b85fec111fdac5d5d48f9b7c6 files/openmotif-2.1.30-xpm2.diff 47085
+MD5 97928107920650b7537879c99bf0dcb9 files/openmotif-2.2.3-CAN-2004-0687-0688.patch 13114
+RMD160 ff21f6f69e008737a445e974e2604b503cb4cbbd files/openmotif-2.2.3-CAN-2004-0687-0688.patch 13114
+SHA256 217db5425a1da21206fe6058f4a3ccf312870c0f7c90678b399f313edddf7545 files/openmotif-2.2.3-CAN-2004-0687-0688.patch 13114
+MD5 db318d4fb05541d70e7e451d46987bd1 files/openmotif-2.2.3-CAN-2004-0914_sec8.patch 491
+RMD160 e48a0bf2c7576f9c641ad1f3ef013d4875e5c736 files/openmotif-2.2.3-CAN-2004-0914_sec8.patch 491
+SHA256 6a2ea6dc149b31b77716fd23a32ea704e8f67a5287a8ef8e8c55624986193236 files/openmotif-2.2.3-CAN-2004-0914_sec8.patch 491
+MD5 307acb8e70d5d1bba7e8035dd043bfbd files/openmotif-2.2.3-CVE-2005-3964.patch 1139
+RMD160 b1d0daba728a102bcf85d7e0eb81376f5e981781 files/openmotif-2.2.3-CVE-2005-3964.patch 1139
+SHA256 fb0d27ad2ddc6c7992b0b110ff7590d145f8969ee13bbe46aa22b11189065574 files/openmotif-2.2.3-CVE-2005-3964.patch 1139
+MD5 aaf04376f7011a2f68b7961100f611fb files/openmotif-2.2.3-Mwm.defaults 536
+RMD160 99fc40c2e923b53a14b2911c37064f2c9cd3f63b files/openmotif-2.2.3-Mwm.defaults 536
+SHA256 5373d8c7bd5460ce83bda99f08725fe9154cd4b5ca2b0698e5a0fda10e50f250 files/openmotif-2.2.3-Mwm.defaults 536
MD5 5f3081ba56f381a6c667c4677258d1c0 files/openmotif-2.2.3-XmResizeHashTable.patch 183
-MD5 b38be118160b49f6b0f9e31d26f01594 files/CAN-2005-0605.patch 1118
-MD5 7284e10e14cac30429821b824dd2f722 files/site.def 2062
-MD5 ed2738dd3cbdc87b0800fe9710092d18 files/openmotif-2.1.30-imake-ansi.patch 6554
+RMD160 19df6e6eed3b9a90797b38852f43e4e1b244be99 files/openmotif-2.2.3-XmResizeHashTable.patch 183
+SHA256 e00db6a657b57259df18f7daa8c944280c41b94381867b34d24521bc58bc3a5d files/openmotif-2.2.3-XmResizeHashTable.patch 183
MD5 d5f7bbd57d8951fec70fac481f00a83e files/openmotif-2.2.3-automake.patch 275
-MD5 76aa44266e6ebef00c664b2f24822ce9 files/openmotif-2.1.30-CAN-2004-0687-0688.patch.bz2 3274
-MD5 307acb8e70d5d1bba7e8035dd043bfbd files/openmotif-2.2.3-CVE-2005-3964.patch 1139
-MD5 f586e24ce0a2b3eeea25a82c8ec1d3c4 files/openmotif-2.1.30-uil-bad_grammar_fix.diff 832
+RMD160 e4a2e883e43cc80a092691518c9a293281238bf8 files/openmotif-2.2.3-automake.patch 275
+SHA256 dc1a479ad8aafe67fa9e4e673e38bf89ad1ec5d1124acca008125dc01c3af7eb files/openmotif-2.2.3-automake.patch 275
+MD5 644560d15450d90e787bf12ac8e77638 files/openmotif-2.2.3-char_not_supported.patch 1014
+RMD160 dbbcccf576674ded138ab03a478893379a21d68c files/openmotif-2.2.3-char_not_supported.patch 1014
+SHA256 d0ec8c7a46ba400512e942c4cd687ed4b48feb656cf54093c4d7f2a506009e02 files/openmotif-2.2.3-char_not_supported.patch 1014
+MD5 216193f922fae0747195fd851696b580 files/openmotif-2.2.3-mwm-configdir.patch 1549
+RMD160 e42d08b16625b188feadad26ef33b75679d31bbf files/openmotif-2.2.3-mwm-configdir.patch 1549
+SHA256 e917e9dda8ae1a331075206d24f535cdd7d3523c57525a94d1e0b60affd70053 files/openmotif-2.2.3-mwm-configdir.patch 1549
MD5 ae018b1d050619b521ce52cf1a822ef9 files/openmotif-2.2.3-no_demos.patch 3803
-MD5 a6ffd504c7b34b3c24a2e9f45e864bbe files/openmotif-2.2.3-CAN-2004-0914-newer.patch.bz2 11986
+RMD160 76520548a9a45b7d90eaa675f3b406aad9b4e920 files/openmotif-2.2.3-no_demos.patch 3803
+SHA256 b6ff9b9cfb0a6165ce46f4fb0987bdc87cddd52d84b3fb12166688bfc7e3f6a6 files/openmotif-2.2.3-no_demos.patch 3803
+MD5 339b1b38271b9dfdd8c476429b55787e files/openmotif-2.2.3-pixel_length.patch 450
+RMD160 398b297d6e83cae2865bfdc14eb32204e47eccf9 files/openmotif-2.2.3-pixel_length.patch 450
+SHA256 806d2110c5a87011c476314c916c089572777874fb402da26d4159625c3dec27 files/openmotif-2.2.3-pixel_length.patch 450
MD5 f89741373660d1834cb1063c06dda8fd files/openmotif-2.2.3-popup_timeout.patch 359
-MD5 62870f12ebc148c6319223ec659c290f files/openmotif-2.1.30-CAN-2004-0914_sec8.patch 471
-MD5 644560d15450d90e787bf12ac8e77638 files/openmotif-2.2.3-char_not_supported.patch 1014
+RMD160 812b804bf85deea3fce7908530fc535ee5242142 files/openmotif-2.2.3-popup_timeout.patch 359
+SHA256 5cb56bbdef8dbb511b259ffdbb9c213abeded8159ed4ca21909e6b8e7cb69322 files/openmotif-2.2.3-popup_timeout.patch 359
MD5 3d88ee9c10e8b44d8aea01c57f412f09 files/openmotif-2.2.3-uil.patch 10746
-MD5 818d2d673fe5ee323f93b5a66fb1baca files/digest-openmotif-2.1.30-r13 79
-MD5 28350d5dab901ef8cd0dc92e578e3f45 files/openmotif-2.1.30-imake-tmpdir.patch 1083
-MD5 5c49a886f108baeda96fc41f32647cf6 files/openmotif-2.1.30-CAN-2004-0914-newer.patch.bz2 12300
-MD5 7284e10e14cac30429821b824dd2f722 files/site.def.1 2062
-MD5 81bc342197a88eb207901ec3ea8927c7 files/openmotif-2.2.3-CAN-2004-0914.patch.bz2 11770
-MD5 aaf04376f7011a2f68b7961100f611fb files/openmotif-2.2.3-Mwm.defaults 536
-MD5 db318d4fb05541d70e7e451d46987bd1 files/openmotif-2.2.3-CAN-2004-0914_sec8.patch 491
+RMD160 7ce99bde4d98bfb8cf023d123e2a41a25166b1d9 files/openmotif-2.2.3-uil.patch 10746
+SHA256 6770e481633c0910ac2f901551962c0e58a59c8a80df70bff1e2378fe8d3e56d files/openmotif-2.2.3-uil.patch 10746
MD5 214cd8f46dc88caf500e6307658abfbf files/openmotif-2.2.3-utf8.patch 2979
-MD5 216193f922fae0747195fd851696b580 files/openmotif-2.2.3-mwm-configdir.patch 1549
+RMD160 4f362ddd7f4e40233faa4862ef796a1c1a9fe7a0 files/openmotif-2.2.3-utf8.patch 2979
+SHA256 2a024df6a28baf0b0bc03763ecbee512554199bfcf1cee87c0f91da8d8482dcd files/openmotif-2.2.3-utf8.patch 2979
+MD5 7284e10e14cac30429821b824dd2f722 files/site.def 2062
+RMD160 3b39238fde89c523ef4a4f1e72c49de5f901de32 files/site.def 2062
+SHA256 d1136f63ecd9c9779ff3ba5b9ce062a0580cb713d948f3f992d8ff85091c2770 files/site.def 2062
+MD5 7284e10e14cac30429821b824dd2f722 files/site.def.1 2062
+RMD160 3b39238fde89c523ef4a4f1e72c49de5f901de32 files/site.def.1 2062
+SHA256 d1136f63ecd9c9779ff3ba5b9ce062a0580cb713d948f3f992d8ff85091c2770 files/site.def.1 2062
+MD5 503ccb1138f9c49f0855884d830988a6 metadata.xml 253
+RMD160 bfa92d311ac4e8cc9a2190f578925f333ae096a8 metadata.xml 253
+SHA256 8e0389110e0cd8cc331b484cde34c22dd93f9f49df16c2263eea4d8e84093976 metadata.xml 253
+MD5 b4534eeeecf8d1d73e9ee47577bc25e6 openmotif-2.1.30-r13.ebuild 5158
+RMD160 5a0c5dea3bdc8929d2001439d4e316fb85d16f60 openmotif-2.1.30-r13.ebuild 5158
+SHA256 c0cd84efa959f1a923bd85bb9f8ab1da374eeae3387ac46428d81bc179d8e30a openmotif-2.1.30-r13.ebuild 5158
+MD5 cbb60554d94564b84d4960afdbcc2500 openmotif-2.1.30-r9.ebuild 3939
+RMD160 9f48e31e68e115ebd5e418fb5078e413f11044a4 openmotif-2.1.30-r9.ebuild 3939
+SHA256 1d24ee64515cc30096ff93dc7c8dd950b9eab0c4b65c14e390d6d3d40962bc1c openmotif-2.1.30-r9.ebuild 3939
+MD5 820298e14c2fe7aa9d83621eb59a75ad openmotif-2.2.3-r3.ebuild 3239
+RMD160 afb52583d277091014b70de64de476b4103e872b openmotif-2.2.3-r3.ebuild 3239
+SHA256 b9e9655f290c0615eb06a335939e5106af7f1df303e20abeffaf5ff7372a9fb3 openmotif-2.2.3-r3.ebuild 3239
+MD5 0b8526ea0e8fb64a6dafc6108efae24d openmotif-2.2.3-r7.ebuild 3919
+RMD160 d4179eee0775bea90d0a6f1b6c8f814cc035c134 openmotif-2.2.3-r7.ebuild 3919
+SHA256 7960c865b1cdaede2874bc1490dbc1e4d8969740c4c8f5ca7da9b66aec42d79f openmotif-2.2.3-r7.ebuild 3919
+MD5 89c85e4f5cdebc8d161d4dcf1a8f3b5e openmotif-2.2.3-r8.ebuild 3916
+RMD160 d22b5a41b63d8fabf0bfb0f308abf8b1a7c196f4 openmotif-2.2.3-r8.ebuild 3916
+SHA256 33456cc74041c0c6146bbc62df029a923a59c8841af3e12519cf49177f1c724c openmotif-2.2.3-r8.ebuild 3916
+MD5 c169762695749d5670debf91362355c3 openmotif-2.2.3-r9.ebuild 3918
+RMD160 8028feed361f520fa754ee32fe342c48dda0370a openmotif-2.2.3-r9.ebuild 3918
+SHA256 4a23d6c447a4821cf8b14d21e7515343975f72afe4ea20f970d2c3b6165e5042 openmotif-2.2.3-r9.ebuild 3918
diff --git a/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0687-0688.patch b/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0687-0688.patch
new file mode 100644
index 000000000000..effb24834126
--- /dev/null
+++ b/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0687-0688.patch
@@ -0,0 +1,421 @@
+--- motif/lib/Xm/Xpmhashtab.c.CAN-2004-0687-0688 2000-04-28 17:05:22.000000000 +0200
++++ motif/lib/Xm/Xpmhashtab.c 2004-10-05 13:37:32.477639974 +0200
+@@ -136,7 +136,7 @@
+ xpmHashTable *table;
+ {
+ xpmHashAtom *atomTable = table->atomTable;
+- int size = table->size;
++ unsigned int size = table->size;
+ xpmHashAtom *t, *p;
+ int i;
+ int oldSize = size;
+@@ -145,6 +145,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);
+@@ -205,6 +207,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);
+--- motif/lib/Xm/XpmWrFFrI.c.CAN-2004-0687-0688 2000-04-28 17:05:22.000000000 +0200
++++ motif/lib/Xm/XpmWrFFrI.c 2004-10-05 13:37:32.479639699 +0200
+@@ -239,6 +239,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);
+--- motif/lib/Xm/Xpmdata.c.CAN-2004-0687-0688 2000-04-28 17:05:21.000000000 +0200
++++ motif/lib/Xm/Xpmdata.c 2004-10-05 13:37:32.481639425 +0200
+@@ -371,7 +371,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';
+--- motif/lib/Xm/XpmI.h.CAN-2004-0687-0688 2004-10-05 13:37:32.253670716 +0200
++++ motif/lib/Xm/XpmI.h 2004-10-05 13:37:32.483639150 +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;
+
+--- motif/lib/Xm/XpmCrDatFrI.c.CAN-2004-0687-0688 2000-04-28 17:05:22.000000000 +0200
++++ motif/lib/Xm/XpmCrDatFrI.c 2004-10-05 13:37:32.485638876 +0200
+@@ -129,6 +129,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);
+--- motif/lib/Xm/Xpmscan.c.CAN-2004-0687-0688 2000-04-28 17:05:21.000000000 +0200
++++ motif/lib/Xm/Xpmscan.c 2004-10-05 13:37:32.487638601 +0200
+@@ -93,7 +93,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));
+
+@@ -220,11 +221,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);
+@@ -280,6 +287,8 @@
+ * color
+ */
+
++ if (pmap.ncolors >= SIZE_MAX / sizeof(XpmColor))
++ RETURN(XpmNoMemory);
+ colorTable = (XpmColor *) XpmCalloc(pmap.ncolors, sizeof(XpmColor));
+ if (!colorTable)
+ RETURN(XpmNoMemory);
+@@ -327,6 +336,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];
+@@ -374,7 +385,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;
+@@ -418,6 +429,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);
+--- motif/lib/Xm/XpmAttrib.c.CAN-2004-0687-0688 2000-04-28 17:05:22.000000000 +0200
++++ motif/lib/Xm/XpmAttrib.c 2004-10-05 13:37:32.489638327 +0200
+@@ -36,8 +36,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));
+
+@@ -47,12 +47,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;
+--- motif/lib/Xm/Xpmcreate.c.CAN-2004-0687-0688 2000-04-28 17:05:21.000000000 +0200
++++ motif/lib/Xm/Xpmcreate.c 2004-10-05 13:37:32.493637778 +0200
+@@ -799,6 +799,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)
+@@ -942,6 +945,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);
+@@ -1987,6 +1992,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);
+@@ -2200,6 +2208,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;
+@@ -2298,6 +2309,9 @@
+ char *s;
+ char buf[BUFSIZ];
+
++ if (cpp >= sizeof(buf))
++ return (XpmFileInvalid);
++
+ buf[cpp] = '\0';
+ if (USE_HASHTABLE) {
+ xpmHashAtom *slot;
+--- motif/lib/Xm/Xpmparse.c.CAN-2004-0687-0688 2000-04-28 17:05:21.000000000 +0200
++++ motif/lib/Xm/Xpmparse.c 2004-10-05 13:37:32.495637503 +0200
+@@ -41,6 +41,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,
+@@ -209,7 +228,7 @@
+ unsigned int *extensions;
+ {
+ unsigned int l;
+- char buf[BUFSIZ];
++ char buf[BUFSIZ + 1];
+
+ if (!data->format) { /* XPM 2 or 3 */
+
+@@ -318,10 +337,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;
+@@ -329,6 +348,8 @@
+ char **defaults;
+ int ErrorStatus;
+
++ if (ncolors >= SIZE_MAX / sizeof(XpmColor))
++ return (XpmNoMemory);
+ colorTable = (XpmColor *) XpmCalloc(ncolors, sizeof(XpmColor));
+ if (!colorTable)
+ return (XpmNoMemory);
+@@ -340,6 +361,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);
+@@ -377,13 +402,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 */
+@@ -394,9 +420,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;
+ }
+ }
+@@ -404,12 +430,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 */
+@@ -422,6 +449,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);
+@@ -450,16 +481,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)
+@@ -484,6 +516,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
+@@ -507,6 +542,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;
+@@ -584,6 +622,9 @@
+ char *s;
+ char buf[BUFSIZ];
+
++ if (cpp >= sizeof(buf))
++ return (XpmFileInvalid);
++
+ buf[cpp] = '\0';
+ if (USE_HASHTABLE) {
+ xpmHashAtom *slot;
diff --git a/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0687-0688.patch.bz2 b/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0687-0688.patch.bz2
deleted file mode 100644
index 74b5f57de2b6..000000000000
--- a/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0687-0688.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0914-newer.patch.bz2 b/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0914-newer.patch.bz2
deleted file mode 100644
index 5fcca2427f93..000000000000
--- a/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0914-newer.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0914.patch.bz2 b/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0914.patch.bz2
deleted file mode 100644
index 7a41cf2ca6b0..000000000000
--- a/x11-libs/openmotif/files/openmotif-2.1.30-CAN-2004-0914.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0687-0688.patch b/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0687-0688.patch
new file mode 100644
index 000000000000..6c8b0e0c2d63
--- /dev/null
+++ b/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0687-0688.patch
@@ -0,0 +1,421 @@
+--- 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;
diff --git a/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0687-0688.patch.bz2 b/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0687-0688.patch.bz2
deleted file mode 100644
index b61d8e0d4f1e..000000000000
--- a/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0687-0688.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0914-newer.patch.bz2 b/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0914-newer.patch.bz2
deleted file mode 100644
index f00beeaf390e..000000000000
--- a/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0914-newer.patch.bz2
+++ /dev/null
Binary files differ
diff --git a/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0914.patch.bz2 b/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0914.patch.bz2
deleted file mode 100644
index e2871ffac5df..000000000000
--- a/x11-libs/openmotif/files/openmotif-2.2.3-CAN-2004-0914.patch.bz2
+++ /dev/null
Binary files differ