summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/perl/x2p/str.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/x2p/str.c b/gnu/usr.bin/perl/x2p/str.c
index 58798c011fc..48e417eee34 100644
--- a/gnu/usr.bin/perl/x2p/str.c
+++ b/gnu/usr.bin/perl/x2p/str.c
@@ -29,7 +29,7 @@ str_2ptr(register STR *str)
GROWSTR(&(str->str_ptr), &(str->str_len), 24);
s = str->str_ptr;
if (str->str_nok) {
- sprintf(s,"%.20g",str->str_nval);
+ snprintf(s,str->str_len,"%.20g",str->str_nval);
while (*s) s++;
}
*s = '\0';