summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-05-07 09:25:04 -0400
committerSteffen Mueller <smueller@cpan.org>2014-05-28 19:27:21 +0200
commit9b56a01971980348bbaf5753e47fcb59dee1ef49 (patch)
tree75e3f1710024dabeea463007e5a0d6cde353ed07 /utf8.c
parent0ac78434bf60027f078daa1108d6c7bcec1ad6e4 (diff)
downloadperl-9b56a01971980348bbaf5753e47fcb59dee1ef49.tar.gz
slen may be uninitialized.
Fix for Coverity perl5 CID 29081: Uninitialized scalar variable (UNINIT) uninit_use_in_call: Using uninitialized value slen when calling Perl_croak. If all fails, slen hasn't been set, and croak will be called with that.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 0ce3eb239a..e97115f4c9 100644
--- a/utf8.c
+++ b/utf8.c
@@ -2808,7 +2808,7 @@ Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8)
HV *const hv = MUTABLE_HV(SvRV(swash));
U32 klen;
U32 off;
- STRLEN slen;
+ STRLEN slen = 0;
STRLEN needents;
const U8 *tmps = NULL;
U32 bit;