In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/bb93890c7f6776cf9d28935e93153fe3c3cbb064?hp=86db16b80af61d0f0d083707c76bef013130caa7>

- Log -----------------------------------------------------------------
commit bb93890c7f6776cf9d28935e93153fe3c3cbb064
Author: Karl Williamson <[email protected]>
Date:   Sun Nov 6 02:05:41 2016 +0100

    utf8.c: No need to look at trailing NUL in comparing string
    
    I meant to get this into commit
    b0b342d4b3fa61880a96b645a3dab648f7c4c682, but didn't.  Subtract 1 from
    the sizeof a constant string to get the number of bytes to compare, as
    we don't need to look at the trailing NUL.
-----------------------------------------------------------------------

Summary of changes:
 utf8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utf8.c b/utf8.c
index 8b301b2..d757577 100644
--- a/utf8.c
+++ b/utf8.c
@@ -452,7 +452,7 @@ S_does_utf8_overflow(const U8 * const s, const U8 * e)
     if (isFF_OVERLONG(s, e - s)) {
         const U8 max_32_bit_overlong[] = "\xFF\x80\x80\x80\x80\x80\x80\x84";
         return memGE(s, max_32_bit_overlong,
-                                    MIN(e - s, sizeof(max_32_bit_overlong)));
+                                MIN(e - s, sizeof(max_32_bit_overlong) - 1));
     }
 
 #endif

--
Perl5 Master Repository

Reply via email to