Changeset 36638 in vbox
- Timestamp:
- Apr 11, 2011 9:51:59 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
include/iprt/string.h (modified) (3 diffs)
-
src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/string.h
r36625 r36638 2429 2429 2430 2430 /** The maximum size argument of a memchr call. */ 2431 #define RTSTR_MEMCHR_MAX ( ~(size_t)0 >> 1)2431 #define RTSTR_MEMCHR_MAX ((~(size_t)0 >> 1) - 15) 2432 2432 2433 2433 /** … … 2443 2443 DECLINLINE(char const *) RTStrEnd(char const *pszString, size_t cchMax) 2444 2444 { 2445 /* Avoid potential issues with memchr seen in glibc. */ 2446 if (cchMax > RTSTR_MEMCHR_MAX) 2445 /* Avoid potential issues with memchr seen in glibc. 2446 * See sysdeps/x86_64/memchr.S in glibc versions older than 2.11 */ 2447 while (cchMax > RTSTR_MEMCHR_MAX) 2447 2448 { 2448 2449 char const *pszRet = (char const *)memchr(pszString, '\0', RTSTR_MEMCHR_MAX); … … 2460 2461 #endif 2461 2462 { 2462 /* Avoid potential issues with memchr seen in glibc. */ 2463 if (cchMax > RTSTR_MEMCHR_MAX) 2463 /* Avoid potential issues with memchr seen in glibc. 2464 * See sysdeps/x86_64/memchr.S in glibc versions older than 2.11 */ 2465 while (cchMax > RTSTR_MEMCHR_MAX) 2464 2466 { 2465 2467 char *pszRet = (char *)memchr(pszString, '\0', RTSTR_MEMCHR_MAX); -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
r36529 r36638 58 58 DECLINLINE(char const *) RTStrEnd(char const *pszString, size_t cchMax) 59 59 { 60 /* Avoid potential issues with memchr seen in glibc. */ 61 if (cchMax > RTSTR_MEMCHR_MAX) 60 /* Avoid potential issues with memchr seen in glibc. 61 * See sysdeps/x86_64/memchr.S in glibc versions older than 2.11 */ 62 while (cchMax > RTSTR_MEMCHR_MAX) 62 63 { 63 64 char const *pszRet = (char const *)memchr(pszString, '\0', RTSTR_MEMCHR_MAX); … … 72 73 DECLINLINE(char *) RTStrEnd(char *pszString, size_t cchMax) 73 74 { 74 /* Avoid potential issues with memchr seen in glibc. */ 75 if (cchMax > RTSTR_MEMCHR_MAX) 75 /* Avoid potential issues with memchr seen in glibc. 76 * See sysdeps/x86_64/memchr.S in glibc versions older than 2.11 */ 77 while (cchMax > RTSTR_MEMCHR_MAX) 76 78 { 77 79 char *pszRet = (char *)memchr(pszString, '\0', RTSTR_MEMCHR_MAX);
Note:
See TracChangeset
for help on using the changeset viewer.

