diff options
Diffstat (limited to 'src/func.c')
-rw-r--r-- | src/func.c | 6 |
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]); } |