summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorsascha <sascha@13f79535-47bb-0310-9956-ffa450edef68>2002-05-07 05:20:55 +0000
committersascha <sascha@13f79535-47bb-0310-9956-ffa450edef68>2002-05-07 05:20:55 +0000
commitff1adf13ec562acd590f91922b841e08f2c93eef (patch)
tree134f8189806596c4f6f831af7a7e95fbbc534890 /strings
parentb6fe08303c10586fd0820873a3f90ba19c0376fd (diff)
downloadlibapr-ff1adf13ec562acd590f91922b841e08f2c93eef.tar.gz
A simple memcpy is sufficient here, because we know the length of the
string. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63369 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'strings')
-rw-r--r--strings/apr_snprintf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c
index 8883a68db..f73bb32c6 100644
--- a/strings/apr_snprintf.c
+++ b/strings/apr_snprintf.c
@@ -550,7 +550,8 @@ static char *conv_fp(register char format, register double num,
* Check for Infinity and NaN
*/
if (apr_isalpha(*p)) {
- *len = strlen(strcpy(buf, p));
+ *len = strlen(p);
+ memcpy(buf, p, *len + 1);
*is_negative = FALSE;
return (buf);
}