In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/3df4a9e6a0858b2eb211254bf6f09de3e233a172?hp=285db6955f5604d4f99b127b881cc95bb1ef131d>

- Log -----------------------------------------------------------------
commit 3df4a9e6a0858b2eb211254bf6f09de3e233a172
Author: David Mitchell <[email protected]>
Date:   Tue Aug 20 13:03:58 2019 +0100

    Perl_quadmath_format_single(): fix off-by-1 err
    
    RT #134369
    
    This function checks that a floating format string (%f, %e etc) on
    -Dusequadmath builds has the 'Q' qualifier , and if not adds it.
    
    However, the "adding" code  allocates a new buffer that is one byte too
    short, which this commit fixes.
    
    In practice it doesn't matter, as in core, this function is only ever
    called when the 'Q' is already present.

-----------------------------------------------------------------------

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

diff --git a/util.c b/util.c
index 165d13a39e..359f3b6d85 100644
--- a/util.c
+++ b/util.c
@@ -4931,7 +4931,7 @@ Perl_quadmath_format_single(const char* format)
         return NULL;
     if (format[len - 2] != 'Q') {
         char* fixed;
-        Newx(fixed, len + 1, char);
+        Newx(fixed, len + 2, char);
         memcpy(fixed, format, len - 1);
         fixed[len - 1] = 'Q';
         fixed[len    ] = format[len - 1];

-- 
Perl5 Master Repository

Reply via email to