@@ -6669,6 +6669,7 @@ if (use_jit)
6669
6669
match_data , mcontext );
6670
6670
if (rc != PCRE2_ERROR_JIT_BADOPTION )
6671
6671
{
6672
+ match_data -> subject_length = length ;
6672
6673
if (rc >= 0 && (options & PCRE2_COPY_MATCHED_SUBJECT ) != 0 )
6673
6674
{
6674
6675
length = CU2BYTES (length + was_zero_terminated );
@@ -7603,6 +7604,7 @@ if (rc == MATCH_MATCH)
7603
7604
{
7604
7605
match_data -> rc = ((int )mb -> end_offset_top >= 2 * match_data -> oveccount )?
7605
7606
0 : (int )mb -> end_offset_top /2 + 1 ;
7607
+ match_data -> subject_length = length ;
7606
7608
match_data -> startchar = start_match - subject ;
7607
7609
match_data -> leftchar = mb -> start_used_ptr - subject ;
7608
7610
match_data -> rightchar = ((mb -> last_used_ptr > mb -> end_match_ptr )?
@@ -7617,6 +7619,7 @@ if (rc == MATCH_MATCH)
7617
7619
match_data -> flags |= PCRE2_MD_COPIED_SUBJECT ;
7618
7620
}
7619
7621
else match_data -> subject = subject ;
7622
+
7620
7623
return match_data -> rc ;
7621
7624
}
7622
7625
@@ -7638,6 +7641,7 @@ PCRE2_ERROR_PARTIAL. */
7638
7641
else if (match_partial != NULL )
7639
7642
{
7640
7643
match_data -> subject = subject ;
7644
+ match_data -> subject_length = length ;
7641
7645
match_data -> ovector [0 ] = match_partial - subject ;
7642
7646
match_data -> ovector [1 ] = end_subject - subject ;
7643
7647
match_data -> startchar = match_partial - subject ;
0 commit comments