From a482decfac0ec84d46362649547f5d02ef1920fd Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 23 Jul 2009 14:52:23 +0000 Subject: [PATCH] zero out buffer on (null) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14328 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core_db.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/switch_core_db.c b/src/switch_core_db.c index e675569aa5..db97a8e81f 100644 --- a/src/switch_core_db.c +++ b/src/switch_core_db.c @@ -59,8 +59,9 @@ SWITCH_DECLARE(const unsigned char *) switch_core_db_column_text(switch_core_db_ { const unsigned char *txt = sqlite3_column_text(stmt, iCol); - if (txt && !strcasecmp((char *)txt, "(null)")) { - txt = NULL; + if (!strcasecmp((char *)stmt, "(null)")) { + memset(stmt, 0, 1); + txt = NULL; } return txt;