aboutsummaryrefslogtreecommitdiff
path: root/src/mem2.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2008-12-10 19:26:22 +0000
committerdrh <drh@noemail.net>2008-12-10 19:26:22 +0000
commitea6788322ed9cb2aee581ed7b2b1befaa45de723 (patch)
tree65d847abfea18be171501bb18f06fa71a44b2da2 /src/mem2.c
parentb27b7f5d3b5d9d249b9abb258ac0e6cb54b78fdd (diff)
downloadsqlite-ea6788322ed9cb2aee581ed7b2b1befaa45de723.tar.gz
sqlite-ea6788322ed9cb2aee581ed7b2b1befaa45de723.zip
Never use strlen(). Use our own internal sqlite3Strlen30() which is
guaranteed to never overflow an integer. Additional explicit casts to avoid nuisance warning messages. (CVS 6007) FossilOrigin-Name: c872d554930ecf221ac2be5f886d5d67bb35288c
Diffstat (limited to 'src/mem2.c')
-rw-r--r--src/mem2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mem2.c b/src/mem2.c
index aaa58e2d1..25a6a56de 100644
--- a/src/mem2.c
+++ b/src/mem2.c
@@ -19,7 +19,7 @@
** This file contains implementations of the low-level memory allocation
** routines specified in the sqlite3_mem_methods object.
**
-** $Id: mem2.c,v 1.41 2008/12/05 17:17:08 drh Exp $
+** $Id: mem2.c,v 1.42 2008/12/10 19:26:24 drh Exp $
*/
#include "sqliteInt.h"
@@ -363,7 +363,7 @@ void sqlite3MemdebugBacktraceCallback(void (*xBacktrace)(int, int, void **)){
** Set the title string for subsequent allocations.
*/
void sqlite3MemdebugSettitle(const char *zTitle){
- unsigned int n = strlen(zTitle) + 1;
+ unsigned int n = sqlite3Strlen30(zTitle) + 1;
sqlite3_mutex_enter(mem.mutex);
if( n>=sizeof(mem.zTitle) ) n = sizeof(mem.zTitle)-1;
memcpy(mem.zTitle, zTitle, n);