[svn-commits] seanbright: branch 10 r374132 - /branches/10/main/db.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Oct 1 12:27:25 CDT 2012
Author: seanbright
Date: Mon Oct 1 12:27:22 2012
New Revision: 374132
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374132
Log:
Use ast_copy_string instead of strncpy to guarantee a NUL terminated string.
Modified:
branches/10/main/db.c
Modified: branches/10/main/db.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/db.c?view=diff&rev=374132&r1=374131&r2=374132
==============================================================================
--- branches/10/main/db.c (original)
+++ branches/10/main/db.c Mon Oct 1 12:27:22 2012
@@ -332,7 +332,7 @@
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);
More information about the svn-commits
mailing list