diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-30 13:16:11 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-30 13:17:28 +0000 |
commit | 3353de27e6a3954b5d45465efd422b1b614675dd (patch) | |
tree | ba7bbc1b5dbeb724e4563074b2a406bae283d1b5 /toke.c | |
parent | 17e8b60cd2a564ab6f4bed82ccda0c92a424ae9f (diff) | |
download | perl-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |