[asterisk-commits] seanbright: trunk r374134 - in /trunk: ./ main/db.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 1 12:28:44 CDT 2012
Author: seanbright
Date: Mon Oct 1 12:28:41 2012
New Revision: 374134
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374134
Log:
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
Modified:
trunk/ (props changed)
trunk/main/db.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/main/db.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/db.c?view=diff&rev=374134&r1=374133&r2=374134
==============================================================================
--- trunk/main/db.c (original)
+++ trunk/main/db.c Mon Oct 1 12:28:41 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 asterisk-commits
mailing list