summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-04-25 09:54:17 +0000
committerNicholas Clark <nick@ccl4.org>2007-04-25 09:54:17 +0000
commit16d8f38a2d6ab27610f67c929d18408a3acc29a9 (patch)
tree8fdfed33308dc5711738fe779105411073ae430a /utf8.c
parent61cc0970c5d0c4b2204859ac6d67af310deec637 (diff)
downloadperl-16d8f38a2d6ab27610f67c929d18408a3acc29a9.tar.gz
Avoid the need for 2 casts added in 31055 by using a better type for
the local variable. Add an assertion that another cast is not a data loss (and that there is no buffer overflow) p4raw-id: //depot/perl@31069
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 3c80bd2197..b44057c40d 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1726,6 +1726,7 @@ Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8)
}
PL_last_swash_hv = hv;
+ assert(klen <= sizeof(PL_last_swash_key));
PL_last_swash_klen = (U8)klen;
/* FIXME change interpvar.h? */
PL_last_swash_tmps = (U8 *) tmps;