diff options
author | Naohiro Aota <naota@gentoo.org> | 2013-03-10 14:02:07 +0000 |
---|---|---|
committer | Naohiro Aota <naota@gentoo.org> | 2013-03-10 14:02:07 +0000 |
commit | 73fc1d15f77dcaf54d6b5f88fe7df6a7c04d6a0a (patch) | |
tree | 6602057a68d98513fb9b4ab9c31ffc0cbe39f40d /sys-freebsd | |
parent | Added a system-ffmpeg to =media-video/avidemux-2.6.1, currently it is disable... (diff) | |
download | historical-73fc1d15f77dcaf54d6b5f88fe7df6a7c04d6a0a.tar.gz historical-73fc1d15f77dcaf54d6b5f88fe7df6a7c04d6a0a.tar.bz2 historical-73fc1d15f77dcaf54d6b5f88fe7df6a7c04d6a0a.zip |
Apply patch for CVE-2010-2632. #458718
Package-Manager: portage-2.2.0_alpha166/cvs/Linux x86_64
Manifest-Sign-Key: 0xF8551514
Diffstat (limited to 'sys-freebsd')
-rw-r--r-- | sys-freebsd/freebsd-lib/ChangeLog | 9 | ||||
-rw-r--r-- | sys-freebsd/freebsd-lib/Manifest | 31 | ||||
-rw-r--r-- | sys-freebsd/freebsd-lib/files/freebsd-lib-9.0-cve-2010-2632.patch | 215 | ||||
-rw-r--r-- | sys-freebsd/freebsd-lib/freebsd-lib-9.0-r4.ebuild (renamed from sys-freebsd/freebsd-lib/freebsd-lib-9.0-r3.ebuild) | 3 |
4 files changed, 241 insertions, 17 deletions
diff --git a/sys-freebsd/freebsd-lib/ChangeLog b/sys-freebsd/freebsd-lib/ChangeLog index cac9e1bc84d3..003b3e2d98d0 100644 --- a/sys-freebsd/freebsd-lib/ChangeLog +++ b/sys-freebsd/freebsd-lib/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-freebsd/freebsd-lib # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.170 2013/02/12 11:08:17 naota Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.171 2013/03/10 14:01:51 naota Exp $ + +*freebsd-lib-9.0-r4 (10 Mar 2013) + + 10 Mar 2013; Naohiro Aota <naota@gentoo.org> + +files/freebsd-lib-9.0-cve-2010-2632.patch, +freebsd-lib-9.0-r4.ebuild, + -freebsd-lib-9.0-r3.ebuild: + Apply patch for CVE-2010-2632. #458718 12 Feb 2013; Naohiro Aota <naota@gentoo.org> +files/freebsd-lib-9.0-bluetooth.patch, +files/freebsd-lib-9.0-netware.patch, diff --git a/sys-freebsd/freebsd-lib/Manifest b/sys-freebsd/freebsd-lib/Manifest index b5719c2ac53e..01ed8b7e8fbd 100644 --- a/sys-freebsd/freebsd-lib/Manifest +++ b/sys-freebsd/freebsd-lib/Manifest @@ -15,6 +15,7 @@ AUX freebsd-lib-8.0-rpcsec_gss.patch 298 SHA256 775ec2ee12c49f134938fa8264c04c6b AUX freebsd-lib-8.2-liblink.patch 510 SHA256 38f967683e9d335ff7860150b2e6ae4d749266937ba195c6747d42d64c8e31ee SHA512 52a050078dc71163709e6dbe6d1c3177adbc51cb9b30a6990194ddd32f5b54e107b758801f0ff5632c4fe800c6734d63d42e53378a78caa0072847060fbb0dee WHIRLPOOL c0b95cb074ff6fd7699a03dfe31572a5edbde2b59c8aac3431fb85a0a0d71ad28566500951e0fb96ed9a8d3081abca7ec507c26e12e988f0ff2ece51bb0df2d1 AUX freebsd-lib-8.2-nlm_syscall.patch 385 SHA256 4b26be44718cb3deb7fb295d403e892ed73ceba7ba43499a889bd49a5e43852b SHA512 1c871dc00da4b6d1106720954014f60933c99508dfc34fe08ae37b2f67ca05f70ac5e1bb75d0d1d119c7750405871ee3fb6e95ebd3ec378fc84e819cc0c4c9fd WHIRLPOOL 4d335910c00f21d2d8d5f80cd99c5316e5c485f935eefb782398e2e308e20a2cd4da0e1acf74c07a2c6d8ff446b3757cc416c0bee7e1be9d9cae0843a45e0748 AUX freebsd-lib-9.0-bluetooth.patch 318 SHA256 5b8810471bd57e1100cc7ee6eee3ed92799e1a5c0244f5ae42f3715189fb06c3 SHA512 71cba168c1530407840dde9e25ce374abb7e0d69800e85bf6f5aff28d1a777ff31f47a84ab763e1518d3492f604d1c09ca95cf8ec5b4e05e8bd5b85267ca4488 WHIRLPOOL eccb54dd10a01358aa7e8267e64f103b89c2981ab2475f27282d5ea0bfe8adb8a106c869ca661553c3d2eda0c1d3d9dec669da6cfe61c23d5749535bdcc8c28b +AUX freebsd-lib-9.0-cve-2010-2632.patch 6963 SHA256 a6383bd3b59bb6a8989ba7746f89115b91e5082768d914bab169842144569c45 SHA512 bb7090a0acbf8ab431334245b1e767da60dcf8f2d23de97a4690e879ae5d528065f5462e2ad3647313662a906f139cfff04f15bce80efede2d2174f74792a07b WHIRLPOOL 6df4a824cd657e79cce984f9181f3e6b20e998f9b9bc1a233bbc5dd7f2e40c055e9f9d401453b49bffb3cc8ef6bb541400f486a966339e56584569c08b358ee4 AUX freebsd-lib-9.0-liblink.patch 627 SHA256 41f0b7f92f2a8f0a3e422447b830d7dec70a068573086484d5efd6826b7c4c3c SHA512 0c570fea9cc386afe4b742985cf7de4d49370be3f34b2059dee76869d8e64bd52db0a07e61fac8924848d12d0e6d510ad6a266ce8ef76e2be885d81d909ab616 WHIRLPOOL b59e3bb0aaede34492d1940a77b11c7e5192643122f18ee6ad363053f9dec2600218ca416dd153e1d0b3bb6621d6f9e2ec50621e6e7f4b610abbd69993dc428a AUX freebsd-lib-9.0-netware.patch 400 SHA256 e83d43f5bf9461c3d332365cca12db7b041b765c79eef392970665740411c382 SHA512 07ebde5797480f37502e60db2a8c9ce9459bd55b176e79c0f20a859cf737f619559cb27706fb0e83fb501493677a3ffeaa9a98d45db3c0c539b71d2f18140246 WHIRLPOOL 2d78565fe0bc0dcdd61d028ba24b20d2db94f32b40536e7e8e1d5e7f485e0e2f3125807dbb6607d26e4366a6aa8ee89a8f0af7c9498f1fba9431f652c181a8f1 AUX freebsd-lib-9.0-opieincludes.patch 4495 SHA256 0868e7454053170c3399f1a03a68f3e70410c79db865e7e2f2b51f5961b5718b SHA512 a3828985f7da9e72ad44d88640952d56079693024bc11b4e3cca86b6f455a9e4756ba76f9e6d4c15960898f39e1dac7bc833e3241082f532c7fbd6d7d6f9418b WHIRLPOOL e0180dd0086c054e9f6895ecfe34bfb21d0e1db483dfc63ad411c651954c4703996d9b537a9566133a01770f2cf0f331727865013413181728c3b21740735473 @@ -76,24 +77,24 @@ DIST freebsd-usbin-9.1.tar.bz2 2670916 SHA256 b938c20b8c09aa9a610e13b69b9afeea72 EBUILD freebsd-lib-7.2-r1.ebuild 12064 SHA256 8dbdd55fda050429e3c7fc7c6a8a64c243440f68db9202830f0714369e03365e SHA512 083c3d2bf669b0218f062e5078defad715aff8d8859c797aabb0071d37ab89d78f924afa7f1131ed132b809dc75c375b9c23587e491266c3f75e4f5f42c59c5b WHIRLPOOL c4fc54e8945ae4e60229e9c3502c7ac41cc3a7bf7e1c34529caabca9119a76ac2fe0d3ce6af309d7e5bbe8b9fb0f77c3fb9dc0600e82525fc72b6e7ea64d5cdd EBUILD freebsd-lib-8.0.ebuild 14745 SHA256 9227bfdc720bc90442c918b8aed86fbcedbd7ad5d5b13d29519587016e362aa5 SHA512 73c6744af7e5affa4869f30c6043d1c74bcecb11eba9e9eea2176a3815f2fe9af138f10d48c8c20ce8b08cc6dc865c79fb3675d814fb13dae10b4dba2b6a3595 WHIRLPOOL d96b990bb1d32ca1c1dca097575af6521da9e5b9adbc1f7b0d494ee73ad53ec0fa947d919be10b8f7342c0bd13d1859bed35cf677f47714e20e545d3029d5563 EBUILD freebsd-lib-8.2-r1.ebuild 15816 SHA256 0d7ffdafe52db8b8c0c13741d15cf5ef32d808179bcfd05915afc4b5557a618a SHA512 2623c08ceb9f09d655d742860ca66f26669fb4ac5674e2b36fbe5a737580a16f404ff5abacaa42dd61a5b104805b29cc83f5c37b17f6c94865772cae169dea3a WHIRLPOOL 9b5780f01ca7980b456449fd8bec36e681ee6fb491839d6b7d7655efe31b57c000214e031c389b58e465349a845846860a1d24e8104ea9692bea37a080d7f8af -EBUILD freebsd-lib-9.0-r3.ebuild 17020 SHA256 ee4c0a8b870fbf6e68a90788eb1aab114d6ee45fdb4f8b8ff84bc62996a1405d SHA512 f6d8bebfe253555fa65a5dcdc1fcb7f0774aa309a62be7c234229e68ef96bf8decc06ae5f9a8cc9b069029f66e955f3c4657f154b5b8056e4e303c2a319ed122 WHIRLPOOL d955819c3da8a6ccc9e81d04b688d8760893be46f06e2ce6ecee3051cf26a700e4252d40b48ea9daa87c168dc97c547c7281993364a9ddb6372298c92de0f47b +EBUILD freebsd-lib-9.0-r4.ebuild 17066 SHA256 3ee6dd5b4496d557c539778b65686da8bbcf88c34c7725227639254cbfc7152f SHA512 df5b7a8c1c344c4ef4eda924351659b98673bd11d18c33ecacacc467c42278abd88a1226c95b36775a1eb1136d69e4a89d906e9f5a4dd5c528c19cd248ccd35e WHIRLPOOL f5751e23801ac805b14d1f533e58b97711e83b0e18dd73feca2f028a5473d0c3a6161b7f04fb74c858761db44c68c2d9c3ff32688b6407cfd678c69bd3d0e121 EBUILD freebsd-lib-9.1.ebuild 17157 SHA256 b1a74967940cb0eb70c6965b3f2add374bc2155afd975c44a90cf65c744ea632 SHA512 ecfb6745880c47dc965363744869cb491f05d60c03463779eb250b3c71d443436dbdc03ae4ce741d8c99d57897a84561e09412d0f825cc9e552c4d17e5253c2d WHIRLPOOL a17b3b88765e62d1f415c41bd5f4e1f9c8349b29eac65e2e064d282ac3af33b5eea532c613fe25d1e6ad2e56ad82263be15128ba5eada42d95023869491c40da -MISC ChangeLog 35028 SHA256 74f2d8d8448378c4b3feb1cd61701595cba1f668e9033bb6d212e8f9b8750a1b SHA512 1622225a1265b83a126916c4677299a3f422ca7101e3d891a5b45adf42b977accbe4cf99a6ae36db7a7c25610e2f49f7d636d94fe664c07bd6eeb4e58a25b360 WHIRLPOOL 8c46357faf502e6df0ec76eb0f94e295bd787e143310e09a26fbd341d7a3b7994cd82d35b8ae6dedaf617e77e3a91ba8539c5c937be9d38f0f465661e2b65973 +MISC ChangeLog 35256 SHA256 d62fe2104e1b78307eb51b6efbece03a9d3dffc4a051a020633c027ef7c248fb SHA512 69d8f0f82e02d4e90583d2464a5b440099ca023459c78fbbc11ff38a71edbbf3370f43b1793d559aceb1162741d2790688da3cfcfde45b6f9eb758654e9fdcce WHIRLPOOL 0c54f53271e7cf9d017a1b25e50418fb2820550724277d883a9bf9e8e037838af139834e78f5255c66882f51e239fdc41b52e53bc9f5287525c82ad0987505b9 MISC metadata.xml 410 SHA256 0ea0a391db3018afdf230e293ffedbc313b4a20db703c8c83fdf144a28c6c246 SHA512 de2a427cd8fcc2c0d7c0a1821f4cc916a280d9c0e21d83fdb7c35d110b48e96854baffc7d469e3461c2a6ee81eaec14d105c45cafbd3aaa37100a525bc60b7af WHIRLPOOL 3b2f587e647dafdb68bdb147bb0d5fecea0e728b52eabb61deb2623641117be6ac0871405666d7616ae1d60eaacf0b621cba8175dca463e9344ad83a4daf5865 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBCAAGBQJRGiKjAAoJEDYO1FT4VRUU8IUQAIdlFEYdYCzUUlZ80MSUt6Ps -TbLj1z6yifE5ux2Fqpx0Dh727fikOFDaw7cWrH08skUcrVwt+KA1Cu87L8Unxe4f -Fm91imXPvt07BuFvN+SPUd+bhQ9I373LMDhtoElFZ4AAQ8Nzg8Eet/8HrKXb6Kx9 -BHbvwFv5ki01tkTMRp+XOtfljkF36O+R3xlVg0x69x1JXx09Hu7jTmVEWYz+NgA9 -sVZQF/whas9B8MAFPBC6r1l+9BgIStoO6USiQBEby1Evs8ckvAkVGG6dU54XL6n1 -yMPgaq8OH1YpczeasozQFLxiRqTN/2MvwukSf8cVXU3W2fOmcXY6hJ+RXLWvjaPi -88T08Scg8LI1+r7uStqHr8a3x5sFGpEGRU4of6vKxPGAzhOmlZ9DfS/ybA1HKho8 -RCbJix6IfQMIAerivQtK6smny+qDoQJAmqbjY2QePno6/rbuHEAKAR5nMf5JEChz -yw/rTxp5ih3YVC2ozcEIk22UMyK6JR9HqKUMzzqS6kcWBN/UPHXCR8K1wYSkjEFE -VKmT6Dd1wm3PY/dsaddSGQg3SndU/eSKzlBnixPQJ8NdwougJyIzqniHiv3VD/eE -JFzgXa4MuKeUhvcmgSt7WK71G9lc6s3B77srpF9BGzJpiwdcngr/pROPQzpcumlL -GQLh9AHZ/iTYpHgPBrYD -=httQ +iQIcBAEBCAAGBQJRPJJWAAoJEDYO1FT4VRUUzc4QAJiFhmoxpbne3XCJ7+wGMXuM +/YEZm16zG1JJKeBWJY8MKruc6x3wM5/5CA9ypkGbARgkYlD1qkQtNvyDOFqazzzW +IOkYU+hOlXC7sfe7tKDYNTkvwB9iqjK4PcRuV+UXHjeUcoEo1hLX0vIYP8iO46iW +TKeNWq0D1ofMlwxjE+vwBfA4s5RY46TWWCR9etLJh5ap3KMhUbhZRywYUnmuxzsS +Hx8l5Ww1+yWZHmJqTn81NYYsGE4+sgFN9Mt3g7zkSzf0a29ki9e5ylXsTIbxchir +Ab1+iDxYhzemMMNuq0vfKXK1Fm/WyN1ARm0idTerFkXTTl4g/ZWFsW1Fa/M1cEVs +4QvOZNX063YxODd7QEW9E4ZTwENdwhjtL4QOaBppVLHE5ddlFC7uaP0AqwSkFj6g +jw9IXAWVmD76U75NZJ6j/j4LiSitIIiAMH3ofmbH/tDq7f0jrgTNgFfIvrNPUmLV +PynUpmOLLmeDh5dFS/lY57aORyLLnf70Z4bcpr8khbw3Fh3EHZsgIbmaoli3yiZY +W1sLVsAjsSb1zhIYHVUwciAOs5Q3mCFc70w13Mn5HqpPv06ljdP77tYK9YmSoFqP +fpgXecar68mJGjJiR0s8jU1QXsLWVO4ZakiCFVKBlWRjnWSKiyqiZwd2bzxZNZ3C +VKkR4vyPZ0pa2nt6TWA4 +=dNmj -----END PGP SIGNATURE----- diff --git a/sys-freebsd/freebsd-lib/files/freebsd-lib-9.0-cve-2010-2632.patch b/sys-freebsd/freebsd-lib/files/freebsd-lib-9.0-cve-2010-2632.patch new file mode 100644 index 000000000000..ad9b9608f42c --- /dev/null +++ b/sys-freebsd/freebsd-lib/files/freebsd-lib-9.0-cve-2010-2632.patch @@ -0,0 +1,215 @@ +Index: lib/libc/gen/glob.c +=================================================================== +--- lib/libc/gen/glob.c (revision 246357) ++++ lib/libc/gen/glob.c (working copy) +@@ -94,6 +94,25 @@ __FBSDID("$FreeBSD$"); + + #include "collate.h" + ++/* ++ * glob(3) expansion limits. Stop the expansion if any of these limits ++ * is reached. This caps the runtime in the face of DoS attacks. See ++ * also CVE-2010-2632 ++ */ ++#define GLOB_LIMIT_BRACE 128 /* number of brace calls */ ++#define GLOB_LIMIT_PATH 65536 /* number of path elements */ ++#define GLOB_LIMIT_READDIR 16384 /* number of readdirs */ ++#define GLOB_LIMIT_STAT 1024 /* number of stat system calls */ ++#define GLOB_LIMIT_STRING ARG_MAX /* maximum total size for paths */ ++ ++struct glob_limit { ++ size_t l_brace_cnt; ++ size_t l_path_lim; ++ size_t l_readdir_cnt; ++ size_t l_stat_cnt; ++ size_t l_string_cnt; ++}; ++ + #define DOLLAR '$' + #define DOT '.' + #define EOS '\0' +@@ -153,15 +172,18 @@ static const Char *g_strchr(const Char *, wchar_t) + static Char *g_strcat(Char *, const Char *); + #endif + static int g_stat(Char *, struct stat *, glob_t *); +-static int glob0(const Char *, glob_t *, size_t *); +-static int glob1(Char *, glob_t *, size_t *); +-static int glob2(Char *, Char *, Char *, Char *, glob_t *, size_t *); +-static int glob3(Char *, Char *, Char *, Char *, Char *, glob_t *, size_t *); +-static int globextend(const Char *, glob_t *, size_t *); +-static const Char * ++static int glob0(const Char *, glob_t *, struct glob_limit *); ++static int glob1(Char *, glob_t *, struct glob_limit *); ++static int glob2(Char *, Char *, Char *, Char *, glob_t *, ++ struct glob_limit *); ++static int glob3(Char *, Char *, Char *, Char *, Char *, glob_t *, ++ struct glob_limit *); ++static int globextend(const Char *, glob_t *, struct glob_limit *); ++static const Char * + globtilde(const Char *, Char *, size_t, glob_t *); +-static int globexp1(const Char *, glob_t *, size_t *); +-static int globexp2(const Char *, const Char *, glob_t *, int *, size_t *); ++static int globexp1(const Char *, glob_t *, struct glob_limit *); ++static int globexp2(const Char *, const Char *, glob_t *, int *, ++ struct glob_limit *); + static int match(Char *, Char *, Char *); + #ifdef DEBUG + static void qprintf(const char *, Char *); +@@ -171,8 +193,8 @@ int + glob(const char * __restrict pattern, int flags, + int (*errfunc)(const char *, int), glob_t * __restrict pglob) + { ++ struct glob_limit limit = { 0, 0, 0, 0, 0 }; + const char *patnext; +- size_t limit; + Char *bufnext, *bufend, patbuf[MAXPATHLEN], prot; + mbstate_t mbs; + wchar_t wc; +@@ -186,11 +208,10 @@ glob(const char * __restrict pattern, int flags, + pglob->gl_offs = 0; + } + if (flags & GLOB_LIMIT) { +- limit = pglob->gl_matchc; +- if (limit == 0) +- limit = ARG_MAX; +- } else +- limit = 0; ++ limit.l_path_lim = pglob->gl_matchc; ++ if (limit.l_path_lim == 0) ++ limit.l_path_lim = GLOB_LIMIT_PATH; ++ } + pglob->gl_flags = flags & ~GLOB_MAGCHAR; + pglob->gl_errfunc = errfunc; + pglob->gl_matchc = 0; +@@ -243,11 +264,17 @@ glob(const char * __restrict pattern, int flags, + * characters + */ + static int +-globexp1(const Char *pattern, glob_t *pglob, size_t *limit) ++globexp1(const Char *pattern, glob_t *pglob, struct glob_limit *limit) + { + const Char* ptr = pattern; + int rv; + ++ if ((pglob->gl_flags & GLOB_LIMIT) && ++ limit->l_brace_cnt++ >= GLOB_LIMIT_BRACE) { ++ errno = 0; ++ return (GLOB_NOSPACE); ++ } ++ + /* Protect a single {}, for find(1), like csh */ + if (pattern[0] == LBRACE && pattern[1] == RBRACE && pattern[2] == EOS) + return glob0(pattern, pglob, limit); +@@ -266,7 +293,8 @@ static int + * If it fails then it tries to glob the rest of the pattern and returns. + */ + static int +-globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv, size_t *limit) ++globexp2(const Char *ptr, const Char *pattern, glob_t *pglob, int *rv, ++ struct glob_limit *limit) + { + int i; + Char *lm, *ls; +@@ -436,7 +464,7 @@ globtilde(const Char *pattern, Char *patbuf, size_ + * if things went well, nonzero if errors occurred. + */ + static int +-glob0(const Char *pattern, glob_t *pglob, size_t *limit) ++glob0(const Char *pattern, glob_t *pglob, struct glob_limit *limit) + { + const Char *qpatnext; + int err; +@@ -529,7 +557,7 @@ compare(const void *p, const void *q) + } + + static int +-glob1(Char *pattern, glob_t *pglob, size_t *limit) ++glob1(Char *pattern, glob_t *pglob, struct glob_limit *limit) + { + Char pathbuf[MAXPATHLEN]; + +@@ -547,7 +575,7 @@ static int + */ + static int + glob2(Char *pathbuf, Char *pathend, Char *pathend_last, Char *pattern, +- glob_t *pglob, size_t *limit) ++ glob_t *pglob, struct glob_limit *limit) + { + struct stat sb; + Char *p, *q; +@@ -563,6 +591,15 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend_ + if (g_lstat(pathbuf, &sb, pglob)) + return(0); + ++ if ((pglob->gl_flags & GLOB_LIMIT) && ++ limit->l_stat_cnt++ >= GLOB_LIMIT_STAT) { ++ errno = 0; ++ if (pathend + 1 > pathend_last) ++ return (GLOB_ABORTED); ++ *pathend++ = SEP; ++ *pathend = EOS; ++ return (GLOB_NOSPACE); ++ } + if (((pglob->gl_flags & GLOB_MARK) && + pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) + || (S_ISLNK(sb.st_mode) && +@@ -606,7 +643,7 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend_ + static int + glob3(Char *pathbuf, Char *pathend, Char *pathend_last, + Char *pattern, Char *restpattern, +- glob_t *pglob, size_t *limit) ++ glob_t *pglob, struct glob_limit *limit) + { + struct dirent *dp; + DIR *dirp; +@@ -652,6 +689,19 @@ glob3(Char *pathbuf, Char *pathend, Char *pathend_ + size_t clen; + mbstate_t mbs; + ++ if ((pglob->gl_flags & GLOB_LIMIT) && ++ limit->l_readdir_cnt++ >= GLOB_LIMIT_READDIR) { ++ errno = 0; ++ if (pathend + 1 > pathend_last) ++ err = GLOB_ABORTED; ++ else { ++ *pathend++ = SEP; ++ *pathend = EOS; ++ err = GLOB_NOSPACE; ++ } ++ break; ++ } ++ + /* Initial DOT must be matched literally. */ + if (dp->d_name[0] == DOT && *pattern != DOT) + continue; +@@ -702,14 +752,15 @@ glob3(Char *pathbuf, Char *pathend, Char *pathend_ + * gl_pathv points to (gl_offs + gl_pathc + 1) items. + */ + static int +-globextend(const Char *path, glob_t *pglob, size_t *limit) ++globextend(const Char *path, glob_t *pglob, struct glob_limit *limit) + { + char **pathv; + size_t i, newsize, len; + char *copy; + const Char *p; + +- if (*limit && pglob->gl_pathc > *limit) { ++ if ((pglob->gl_flags & GLOB_LIMIT) && ++ pglob->gl_matchc > limit->l_path_lim) { + errno = 0; + return (GLOB_NOSPACE); + } +@@ -737,6 +788,12 @@ static int + for (p = path; *p++;) + continue; + len = MB_CUR_MAX * (size_t)(p - path); /* XXX overallocation */ ++ limit->l_string_cnt += len; ++ if ((pglob->gl_flags & GLOB_LIMIT) && ++ limit->l_string_cnt >= GLOB_LIMIT_STRING) { ++ errno = 0; ++ return (GLOB_NOSPACE); ++ } + if ((copy = malloc(len)) != NULL) { + if (g_Ctoc(path, copy, len)) { + free(copy); diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r3.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r4.ebuild index 4295da798ef4..82c6a8ef4869 100644 --- a/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r3.ebuild +++ b/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r3.ebuild,v 1.9 2013/02/12 11:08:17 naota Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r4.ebuild,v 1.1 2013/03/10 14:01:51 naota Exp $ EAPI=2 @@ -94,6 +94,7 @@ PATCHES=( "${FILESDIR}/${PN}-bsdxml2expat.patch" "${FILESDIR}/${PN}-9.0-trylock-adaptive.patch" "${FILESDIR}/${PN}-9.0-netware.patch" + "${FILESDIR}/${PN}-9.0-cve-2010-2632.patch" "${FILESDIR}/${PN}-9.0-bluetooth.patch" ) # Here we disable and remove source which we don't need or want |