summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-11-30 13:16:11 +0000
committerNicholas Clark <nick@ccl4.org>2010-11-30 13:17:28 +0000
commit3353de27e6a3954b5d45465efd422b1b614675dd (patch)
treeba7bbc1b5dbeb724e4563074b2a406bae283d1b5 /toke.c
parent17e8b60cd2a564ab6f4bed82ccda0c92a424ae9f (diff)
downloadperl-3353de27e6a3954b5d45465efd422b1b614675dd.tar.gz
In S_scan_const(), use my_snprintf() instead of my_sprintf().
Paranoid linkers warn about using sprintf(), and rightly so.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c6
1 files changed, 4 insertions, 2 deletions
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