[asterisk-commits] seanbright: branch 11 r374133 - in /branches/11: ./ main/db.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 1 12:28:01 CDT 2012


Author: seanbright
Date: Mon Oct  1 12:27:57 2012
New Revision: 374133

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=374133
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

Modified:
    branches/11/   (props changed)
    branches/11/main/db.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: branches/11/main/db.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/db.c?view=diff&rev=374133&r1=374132&r2=374133
==============================================================================
--- branches/11/main/db.c (original)
+++ branches/11/main/db.c Mon Oct  1 12:27:57 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