[svn-commits] jrose: branch 1.8 r361210 - /branches/1.8/addons/ooh323cDriver.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Apr 4 14:52:09 CDT 2012


Author: jrose
Date: Wed Apr  4 14:52:05 2012
New Revision: 361210

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=361210
Log:
Fix some stuff involving calls to memcpy and memset

The important parts of the patch were already applied through other updates.

(closes issue ASTERISK-19445)
Reported by: Makoto Dei
Patches:
	memset-memcpy-length.patch uploaded by Makoto Dei (license 5027)

Modified:
    branches/1.8/addons/ooh323cDriver.c

Modified: branches/1.8/addons/ooh323cDriver.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323cDriver.c?view=diff&rev=361210&r1=361209&r2=361210
==============================================================================
--- branches/1.8/addons/ooh323cDriver.c (original)
+++ branches/1.8/addons/ooh323cDriver.c Wed Apr  4 14:52:05 2012
@@ -145,14 +145,13 @@
 
 /* make new thread */
  if (cur == NULL) {
-	if (!(cur = ast_malloc(sizeof(struct callthread)))) {
+	if (!(cur = ast_calloc(1, sizeof(struct callthread)))) {
 		ast_log(LOG_ERROR, "Unable to allocate thread structure for call %s\n",
 							call->callToken);
 		return -1;
 	}
 
 	ast_module_ref(myself);
-	memset(cur, 0, sizeof(cur));
 	if ((socketpair(PF_LOCAL, SOCK_STREAM, 0, cur->thePipe)) == -1) {
 		ast_log(LOG_ERROR, "Can't create thread pipe for call %s\n", call->callToken);
 		free(cur);




More information about the svn-commits mailing list