zero out buffer on (null)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14328 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-07-23 14:52:23 +00:00
parent 2f8ab9775c
commit a482decfac
1 changed files with 3 additions and 2 deletions

View 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;