sascha 02/05/06 22:20:55
Modified: strings apr_snprintf.c
Log:
A simple memcpy is sufficient here, because we know the length of the
string.
Revision Changes Path
1.24 +2 -1 apr/strings/apr_snprintf.c
Index: apr_snprintf.c
===================================================================
RCS file: /home/cvs/apr/strings/apr_snprintf.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- apr_snprintf.c 7 May 2002 04:12:44 -0000 1.23
+++ apr_snprintf.c 7 May 2002 05:20:55 -0000 1.24
@@ -550,7 +550,8 @@
* 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);
}