In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/407c4cda70c6f25cc14906843895582c4dbae147?hp=7f8a472bea19cb7746a1be14c8fe5cfde32c6363>

- Log -----------------------------------------------------------------
commit 407c4cda70c6f25cc14906843895582c4dbae147
Author: Jarkko Hietaniemi <[email protected]>
Date:   Sun Feb 5 18:50:11 2017 -0500

    Coverity #155950: pRExC->code_blocks is blindly derefed
    
    Even though code calling S_pat_upgrade_to_utf8 from the
    Perl_re_op_compile is testing the code_blocks for NULLness.
-----------------------------------------------------------------------

Summary of changes:
 regcomp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/regcomp.c b/regcomp.c
index 920ac4e88d..af77b3792b 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6193,7 +6193,9 @@ S_pat_upgrade_to_utf8(pTHX_ RExC_state_t * const 
pRExC_state,
 
     while (s < *plen_p) {
         append_utf8_from_native_byte(src[s], &d);
+
         if (n < num_code_blocks) {
+            assert(pRExC_state->code_blocks);
             if (!do_end && pRExC_state->code_blocks->cb[n].start == s) {
                 pRExC_state->code_blocks->cb[n].start = d - dst - 1;
                 assert(*(d - 1) == '(');

--
Perl5 Master Repository

Reply via email to