Skip to content
Snippets Groups Projects
Commit b3c739a8 authored by Sean Bright's avatar Sean Bright
Browse files

Use ast_copy_string instead of strncpy to guarantee a NUL terminated string.

........

Merged revisions 374132 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 374133 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 154ee24a
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment