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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361210
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
/* 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);