In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/3353de27e6a3954b5d45465efd422b1b614675dd?hp=17e8b60cd2a564ab6f4bed82ccda0c92a424ae9f>

- Log -----------------------------------------------------------------
commit 3353de27e6a3954b5d45465efd422b1b614675dd
Author: Nicholas Clark <[email protected]>
Date:   Tue Nov 30 13:16:11 2010 +0000

    In S_scan_const(), use my_snprintf() instead of my_sprintf().
    
    Paranoid linkers warn about using sprintf(), and rightly so.
-----------------------------------------------------------------------

Summary of changes:
 toke.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/toke.c b/toke.c
index d2868c2..476b331 100644
--- a/toke.c
+++ b/toke.c
@@ -3203,7 +3203,8 @@ S_scan_const(pTHX_ char *start)
                            /* Convert first code point to hex, including the
                             * boiler plate before it */
                            output_length =
-                               my_sprintf(hex_string, "\\N{U+%X", (unsigned 
int) uv);
+                               my_snprintf(hex_string, sizeof(hex_string),
+                                           "\\N{U+%X", (unsigned int) uv);
 
                            /* Make sure there is enough space to hold it */
                            d = off + SvGROW(sv, off
@@ -3227,7 +3228,8 @@ S_scan_const(pTHX_ char *start)
                                }
 
                                output_length =
-                                   my_sprintf(hex_string, ".%X", (unsigned 
int) uv);
+                                   my_snprintf(hex_string, sizeof(hex_string),
+                                               ".%X", (unsigned int) uv);
 
                                d = off + SvGROW(sv, off
                                                     + output_length

--
Perl5 Master Repository

Reply via email to