summaryrefslogtreecommitdiff
path: root/main/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/db.c')
-rw-r--r--main/db.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/db.c b/main/db.c
index 42a4b9c65..32af90568 100644
--- a/main/db.c
+++ b/main/db.c
@@ -332,7 +332,7 @@ int ast_db_get(const char *family, const char *key, char *value, int valuelen)
ast_log(LOG_WARNING, "Couldn't get value\n");
res = -1;
} else {
- strncpy(value, (const char *) result, valuelen);
+ ast_copy_string(value, (const char *) result, valuelen);
}
sqlite3_reset(get_stmt);
ast_mutex_unlock(&dblock);