Index: /trunk/include/iprt/string.h
===================================================================
--- /trunk/include/iprt/string.h	(revision 36637)
+++ /trunk/include/iprt/string.h	(revision 36638)
@@ -2429,5 +2429,5 @@
 
 /** The maximum size argument of a memchr call. */
-#define RTSTR_MEMCHR_MAX            (~(size_t)0 >> 1)
+#define RTSTR_MEMCHR_MAX            ((~(size_t)0 >> 1) - 15)
 
 /**
@@ -2443,6 +2443,7 @@
 DECLINLINE(char const *) RTStrEnd(char const *pszString, size_t cchMax)
 {
-    /* Avoid potential issues with memchr seen in glibc. */
-    if (cchMax > RTSTR_MEMCHR_MAX)
+    /* Avoid potential issues with memchr seen in glibc.
+     * See sysdeps/x86_64/memchr.S in glibc versions older than 2.11 */
+    while (cchMax > RTSTR_MEMCHR_MAX)
     {
         char const *pszRet = (char const *)memchr(pszString, '\0', RTSTR_MEMCHR_MAX);
@@ -2460,6 +2461,7 @@
 #endif
 {
-    /* Avoid potential issues with memchr seen in glibc. */
-    if (cchMax > RTSTR_MEMCHR_MAX)
+    /* Avoid potential issues with memchr seen in glibc.
+     * See sysdeps/x86_64/memchr.S in glibc versions older than 2.11 */
+    while (cchMax > RTSTR_MEMCHR_MAX)
     {
         char *pszRet = (char *)memchr(pszString, '\0', RTSTR_MEMCHR_MAX);
Index: /trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp	(revision 36637)
+++ /trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp	(revision 36638)
@@ -58,6 +58,7 @@
 DECLINLINE(char const *) RTStrEnd(char const *pszString, size_t cchMax)
 {
-    /* Avoid potential issues with memchr seen in glibc. */
-    if (cchMax > RTSTR_MEMCHR_MAX)
+    /* Avoid potential issues with memchr seen in glibc.
+     * See sysdeps/x86_64/memchr.S in glibc versions older than 2.11 */
+    while (cchMax > RTSTR_MEMCHR_MAX)
     {
         char const *pszRet = (char const *)memchr(pszString, '\0', RTSTR_MEMCHR_MAX);
@@ -72,6 +73,7 @@
 DECLINLINE(char *) RTStrEnd(char *pszString, size_t cchMax)
 {
-    /* Avoid potential issues with memchr seen in glibc. */
-    if (cchMax > RTSTR_MEMCHR_MAX)
+    /* Avoid potential issues with memchr seen in glibc.
+     * See sysdeps/x86_64/memchr.S in glibc versions older than 2.11 */
+    while (cchMax > RTSTR_MEMCHR_MAX)
     {
         char *pszRet = (char *)memchr(pszString, '\0', RTSTR_MEMCHR_MAX);
