]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
zero out buffer on (null)
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 23 Jul 2009 14:52:23 +0000 (14:52 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 23 Jul 2009 14:52:23 +0000 (14:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14328 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_db.c

index e675569aa5f56a17b9b4c39876402b288fc1640e..db97a8e81faf835394871581b25a0dea0ffddda4 100644 (file)
@@ -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;