Index: addons/ooh323cDriver.c =================================================================== --- addons/ooh323cDriver.c (revision 357541) +++ addons/ooh323cDriver.c (working copy) @@ -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); Index: main/features.c =================================================================== --- main/features.c (revision 357541) +++ main/features.c (working copy) @@ -3163,7 +3163,7 @@ res = builtin_features[x].operation(chan, peer, config, code, sense, NULL); } if (feature) { - memcpy(feature, &builtin_features[x], sizeof(feature)); + memcpy(feature, &builtin_features[x], sizeof(*feature)); } feature_detected = 1; break; @@ -3193,7 +3193,7 @@ if (operation) { res = fge->feature->operation(chan, peer, config, code, sense, fge->feature); } - memcpy(feature, fge->feature, sizeof(feature)); + memcpy(feature, fge->feature, sizeof(*feature)); if (res != AST_FEATURE_RETURN_KEEPTRYING) { AST_RWLIST_UNLOCK(&feature_groups); break; @@ -3226,7 +3226,7 @@ res = tmpfeature->operation(chan, peer, config, code, sense, tmpfeature); } if (feature) { - memcpy(feature, tmpfeature, sizeof(feature)); + memcpy(feature, tmpfeature, sizeof(*feature)); } if (res != AST_FEATURE_RETURN_KEEPTRYING) { AST_RWLIST_UNLOCK(&feature_list); Index: main/md5.c =================================================================== --- main/md5.c (revision 357541) +++ main/md5.c (working copy) @@ -157,7 +157,7 @@ MD5Transform(ctx->buf, (uint32_t *) ctx->in); byteReverse((unsigned char *) ctx->buf, 4); memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } #ifndef ASM_MD5 Index: res/res_crypto.c =================================================================== --- res/res_crypto.c (revision 357541) +++ res/res_crypto.c (working copy) @@ -116,7 +116,6 @@ key->infd = -2; return -1; } - memset(buf, 0, sizeof(buf)); tmp = ast_hide_password(key->infd); memset(buf, 0, size); res = read(key->infd, buf, size); Index: res/res_adsi.c =================================================================== --- res/res_adsi.c (revision 357541) +++ res/res_adsi.c (working copy) @@ -586,7 +586,7 @@ int bytes = 0, res, gotstar = 0, pos = 0; unsigned char current = 0; - memset(buf, 0, sizeof(buf)); + memset(buf, 0, maxlen); while (bytes <= maxlen) { /* Wait up to a second for a digit */