summaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
Diffstat (limited to 'string')
-rw-r--r--string/strcoll.c2
-rw-r--r--string/strxfrm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/string/strcoll.c b/string/strcoll.c
index 3c5682d1cd..26072018ac 100644
--- a/string/strcoll.c
+++ b/string/strcoll.c
@@ -155,7 +155,7 @@ STRCOLL (s1, s2, l)
Please note that the localedef programs makes sure that `position'
is not used at the first level. */
- if (s1len + s2len >= 16384)
+ if (! __libc_use_alloca (s1len + s2len))
{
idx1arr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
idx2arr = &idx1arr[s1len];
diff --git a/string/strxfrm.c b/string/strxfrm.c
index c53dad5555..6475fa9206 100644
--- a/string/strxfrm.c
+++ b/string/strxfrm.c
@@ -175,7 +175,7 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
values. But since there is no limit on the length of the string
we have to use `malloc' if the string is too long. We should be
very conservative here. */
- if (srclen >= 16384)
+ if (! __libc_use_alloca (srclen))
{
idxarr = (int32_t *) malloc ((srclen + 1) * (sizeof (int32_t) + 1));
rulearr = (unsigned char *) &idxarr[srclen];