zero out buffer on (null)
--- freeswitch/trunk/src/switch_core_db.c 2009-07-23 00:49:55 UTC (rev 14327)
+++ freeswitch/trunk/src/switch_core_db.c 2009-07-23 14:52:23 UTC (rev 14328)
@@ -59,8 +59,9 @@
{
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;