@@ -2280,7 +2280,7 @@ Perl_utf8_to_uv_msgs_helper_(const U8 * const s0,
2280
2280
message = Perl_form (aTHX_
2281
2281
"%s: %s (too short; %d byte%s available, need %d)" ,
2282
2282
malformed_text ,
2283
- _byte_dump_string (s0 , send - s0 , 0 ),
2283
+ _byte_dump_string (s0 , avail_len , 0 ),
2284
2284
(int )avail_len ,
2285
2285
avail_len == 1 ? "" : "s" , /* Pluralize */
2286
2286
(int )expectlen );
@@ -2294,7 +2294,7 @@ Perl_utf8_to_uv_msgs_helper_(const U8 * const s0,
2294
2294
* end of the buffer */
2295
2295
int printlen = (flags & UTF8_NO_CONFIDENCE_IN_CURLEN_ )
2296
2296
? (int ) (s - s0 )
2297
- : (int ) (send - s0 );
2297
+ : (int ) (avail_len );
2298
2298
message = Perl_form (aTHX_ "%s" ,
2299
2299
unexpected_non_continuation_text (s0 ,
2300
2300
printlen ,
@@ -2341,7 +2341,7 @@ Perl_utf8_to_uv_msgs_helper_(const U8 * const s0,
2341
2341
"%s: %s (overlong; instead use %s to represent"
2342
2342
" %s%0*" UVXf ")" ,
2343
2343
malformed_text ,
2344
- _byte_dump_string (s0 , send - s0 , 0 ),
2344
+ _byte_dump_string (s0 , avail_len , 0 ),
2345
2345
_byte_dump_string (tmpbuf , e - tmpbuf , 0 ),
2346
2346
preface ,
2347
2347
((input_uv < 256 ) ? 2 : 4 ), /* Field width of 2
0 commit comments