aboutsummaryrefslogtreecommitdiff
path: root/src/func.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-05-04 13:15:55 +0000
committerdrh <drh@noemail.net>2007-05-04 13:15:55 +0000
commit5bb3eb9b9ae6008a1e5ee6ffa9a75b1ef14d7f0f (patch)
tree95a6f87a3340c4292d0b03201c2512f567fc2cfd /src/func.c
parent92d4d7a92e1a1e465a0d5fd3e9a42e90ddcbda4b (diff)
downloadsqlite-5bb3eb9b9ae6008a1e5ee6ffa9a75b1ef14d7f0f.tar.gz
sqlite-5bb3eb9b9ae6008a1e5ee6ffa9a75b1ef14d7f0f.zip
Eliminate all uses of sprintf() and strcpy(). These were not being
misused. But getting rid of them removes a library dependency. And it avoids warnings from the OpenBSD compiler. Ticket #2336. (CVS 3916) FossilOrigin-Name: ba4845b32bdf38e623c4f7246e6e327715bbba4b
Diffstat (limited to 'src/func.c')
-rw-r--r--src/func.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/func.c b/src/func.c
index c3279b4fe..5e4b418d5 100644
--- a/src/func.c
+++ b/src/func.c
@@ -16,7 +16,7 @@
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
-** $Id: func.c,v 1.144 2007/05/02 02:08:29 drh Exp $
+** $Id: func.c,v 1.145 2007/05/04 13:15:56 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -222,7 +222,7 @@ static void upperFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
if( z2 ){
z1 = sqlite3_malloc(n+1);
if( z1 ){
- strcpy(z1, z2);
+ memcpy(z1, z2, n+1);
for(i=0; z1[i]; i++){
z1[i] = toupper(z1[i]);
}
@@ -240,7 +240,7 @@ static void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
if( z2 ){
z1 = sqlite3_malloc(n+1);
if( z1 ){
- strcpy(z1, z2);
+ memcpy(z1, z2, n+1);
for(i=0; z1[i]; i++){
z1[i] = tolower(z1[i]);
}