summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-23 01:00:31 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-23 01:00:31 +0000
commit37cda61e6cf9e214e2616d0104296009da3b1231 (patch)
treea1061f21df76f8894b0f82cfec2916ad6d2c1d89 /ext
parent8a996ce8d00364c0bbcf12b34586652aab085a22 (diff)
downloadperl-37cda61e6cf9e214e2616d0104296009da3b1231.tar.gz
Purify: Array bounds write: pre-extend the strxfrm
buffer by a factor of four (suggested maximum by HP-UX; Solaris suggests using 1 + strxfrm(NULL, s, 0) but I don't know how portable that is; locale.c uses yet another trick (not a particularly good trick, I might add)) p4raw-id: //depot/perl@15435
Diffstat (limited to 'ext')
-rw-r--r--ext/POSIX/POSIX.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 238c5285ef..2d1abf3060 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1568,7 +1568,7 @@ strxfrm(src)
STRLEN dstlen;
char *p = SvPV(src,srclen);
srclen++;
- ST(0) = sv_2mortal(NEWSV(800,srclen));
+ ST(0) = sv_2mortal(NEWSV(800,srclen*4+1));
dstlen = strxfrm(SvPVX(ST(0)), p, (size_t)srclen);
if (dstlen > srclen) {
dstlen++;