summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src/rt.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2007-02-24 16:25:58 +0000
committerMarcus Boerger <helly@php.net>2007-02-24 16:25:58 +0000
commit20a40063c51b20c1ea5f48c109b69fea3964b446 (patch)
tree24d6bf7894cc8080ff86f16eb5efef9da1cdf9c7 /ext/bcmath/libbcmath/src/rt.c
parent10ffce328593ddda1fb31482ec5d19ce6e02556d (diff)
downloadphp-git-20a40063c51b20c1ea5f48c109b69fea3964b446.tar.gz
- avoid sprintf
Diffstat (limited to 'ext/bcmath/libbcmath/src/rt.c')
-rw-r--r--ext/bcmath/libbcmath/src/rt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bcmath/libbcmath/src/rt.c b/ext/bcmath/libbcmath/src/rt.c
index 2479104fe4..5a98b68f7e 100644
--- a/ext/bcmath/libbcmath/src/rt.c
+++ b/ext/bcmath/libbcmath/src/rt.c
@@ -45,7 +45,7 @@ void bc_rt_warn (char *mesg ,...)
char error_mesg [255];
va_start (args, mesg);
- vsprintf (error_mesg, mesg, args);
+ vsnprintf (error_mesg, sizeof(error_mesg), mesg, args);
va_end (args);
fprintf (stderr, "bc math warning: %s\n", error_mesg);
@@ -58,7 +58,7 @@ void bc_rt_error (char *mesg ,...)
char error_mesg [255];
va_start (args, mesg);
- vsprintf (error_mesg, mesg, args);
+ vsnprintf (error_mesg, sizeof(error_mesg), mesg, args);
va_end (args);
fprintf (stderr, "bc math error: %s\n", error_mesg);