From 3353de27e6a3954b5d45465efd422b1b614675dd Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 30 Nov 2010 13:16:11 +0000 Subject: In S_scan_const(), use my_snprintf() instead of my_sprintf(). Paranoid linkers warn about using sprintf(), and rightly so. --- toke.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'toke.c') diff --git a/toke.c b/toke.c index d2868c2b57..476b331043 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 -- cgit v1.2.1