diff options
| author | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:27 -0400 |
|---|---|---|
| committer | Mark A. Hershberger <mah@debian.(none)> | 2009-03-25 00:37:27 -0400 |
| commit | 2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b (patch) | |
| tree | 41ccc042009cba53e4ce43e727fcba4c1cfbf7f3 /ext/bcmath/libbcmath | |
| parent | d29a4fd2dd3b5d4cf6e80b602544d7b71d794e76 (diff) | |
| download | php-upstream/5.2.2.tar.gz | |
Imported Upstream version 5.2.2upstream/5.2.2
Diffstat (limited to 'ext/bcmath/libbcmath')
| -rw-r--r-- | ext/bcmath/libbcmath/src/output.c | 2 | ||||
| -rw-r--r-- | ext/bcmath/libbcmath/src/rt.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/bcmath/libbcmath/src/output.c b/ext/bcmath/libbcmath/src/output.c index ab49b0e36..ad4e37546 100644 --- a/ext/bcmath/libbcmath/src/output.c +++ b/ext/bcmath/libbcmath/src/output.c @@ -71,7 +71,7 @@ bc_out_long (val, size, space, out_char) int len, ix; if (space) (*out_char) (' '); - sprintf (digits, "%ld", val); + snprintf(digits, sizeof(digits), "%ld", val); len = strlen (digits); while (size > len) { diff --git a/ext/bcmath/libbcmath/src/rt.c b/ext/bcmath/libbcmath/src/rt.c index 2479104fe..5a98b68f7 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); |
