summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-04-26 20:43:13 +0000
committerNicholas Clark <nick@ccl4.org>2007-04-26 20:43:13 +0000
commit1f1a6e4688ff764ec0ae257cdc79a5374937af88 (patch)
treecde80d4e5611eb6fb0a9c3b3fcb427e8d9ac2a25 /regexec.c
parent224e8ef5af1c2136286a2281940d1d58698affca (diff)
downloadperl-1f1a6e4688ff764ec0ae257cdc79a5374937af88.tar.gz
Avoid a SIGBUS caused by passing a U32 pointer to utf8_to_uvchr(),
which expects a STRLEN pointer. Avoid some signed/unsigned casting warnings by adding casts. p4raw-id: //depot/perl@31093
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index 374d480be7..79fab43436 100644
--- a/regexec.c
+++ b/regexec.c
@@ -5022,8 +5022,9 @@ NULL
U8 tmpbuf2[UTF8_MAXBYTES_CASE+1];
STRLEN tmplen2;
to_uni_fold(n, tmpbuf1, &tmplen1);
- to_utf8_fold(locinput, tmpbuf2, &tmplen2);
- if (tmplen1!=tmplen2 || !strnEQ(tmpbuf1,tmpbuf2,tmplen1))
+ to_utf8_fold((U8*)locinput, tmpbuf2, &tmplen2);
+ if (tmplen1!=tmplen2
+ || !strnEQ((char *)tmpbuf1,(char *)tmpbuf2,tmplen1))
sayNO;
else
locinput += UTF8SKIP(locinput);