int i = 0;
int col_idx;
const char *query = "select * from alarmmgr";
+ const char *null_str = "null";
sqlite3_stmt *stmt = NULL;
const char *tail = NULL;
alarm_info_t *alarm_info = NULL;
strncpy(bundle, (const char *)sqlite3_column_text(stmt, col_idx++),
MAX_BUNDLE_NAME_LEN - 1);
noti_len = sqlite3_column_int(stmt, col_idx++);
+ noti_len = noti_len ? noti_len : strlen(null_str);
noti = calloc(1, noti_len + 1);
strncpy(noti, (const char *)sqlite3_column_text(stmt, col_idx++),
noti_len);