View | Details | Raw Unified | Return to bug 64049
Collapse All | Expand All

(-)modules/ssl/ssl_ct_log_config.c (-1 / +1 lines)
Lines 113-119 Link Here
113
static void digest_public_key(EVP_PKEY *pubkey, unsigned char digest[LOG_ID_SIZE])
113
static void digest_public_key(EVP_PKEY *pubkey, unsigned char digest[LOG_ID_SIZE])
114
{
114
{
115
    int len = i2d_PUBKEY(pubkey, NULL);
115
    int len = i2d_PUBKEY(pubkey, NULL);
116
    unsigned char *val = malloc(len);
116
    unsigned char *val = ap_malloc(len);
117
    unsigned char *tmp = val;
117
    unsigned char *tmp = val;
118
    SHA256_CTX sha256ctx;
118
    SHA256_CTX sha256ctx;
119
119
(-)modules/ssl/ssl_ct_sct.c (-1 / +1 lines)
Lines 217-223 Link Here
217
                + 2 + fields->extlen /* 16-bit length + extensions */
217
                + 2 + fields->extlen /* 16-bit length + extensions */
218
                ;
218
                ;
219
            avail = orig_len;
219
            avail = orig_len;
220
            mem = malloc(avail);
220
            mem = ap_malloc(avail);
221
            orig_mem = mem;
221
            orig_mem = mem;
222
            
222
            
223
            rv = ctutil_serialize_uint8(&mem, &avail, 0); /* version 1 */
223
            rv = ctutil_serialize_uint8(&mem, &avail, 0); /* version 1 */
(-)server/mpm/winnt/service.c (-8 / +8 lines)
Lines 383-389 Link Here
383
    apr_size_t wslen = wcslen(argv[0]) + 1;
383
    apr_size_t wslen = wcslen(argv[0]) + 1;
384
    apr_size_t slen = wslen * 3 - 2;
384
    apr_size_t slen = wslen * 3 - 2;
385
385
386
    service_name = malloc(slen);
386
    service_name = ap_malloc(slen);
387
    (void)apr_conv_ucs2_to_utf8(argv[0], &wslen, service_name, &slen);
387
    (void)apr_conv_ucs2_to_utf8(argv[0], &wslen, service_name, &slen);
388
388
389
    /* args and service names live in the same pool */
389
    /* args and service names live in the same pool */
Lines 415-421 Link Here
415
        DWORD i;
415
        DWORD i;
416
416
417
        mpm_new_argv->nalloc = mpm_new_argv->nelts + argc - 1;
417
        mpm_new_argv->nalloc = mpm_new_argv->nelts + argc - 1;
418
        cmb_data = malloc(mpm_new_argv->nalloc * sizeof(const char *));
418
        cmb_data = ap_malloc(mpm_new_argv->nalloc * sizeof(const char *));
419
419
420
        /* mpm_new_argv remains first (of lower significance) */
420
        /* mpm_new_argv remains first (of lower significance) */
421
        memcpy (cmb_data, mpm_new_argv->elts,
421
        memcpy (cmb_data, mpm_new_argv->elts,
Lines 431-437 Link Here
431
        {
431
        {
432
            wslen = wcslen(argv[i]) + 1;
432
            wslen = wcslen(argv[i]) + 1;
433
            slen = wslen * 3 - 2;
433
            slen = wslen * 3 - 2;
434
            service_name = malloc(slen);
434
            service_name = ap_malloc(slen);
435
            (void)apr_conv_ucs2_to_utf8(argv[i], &wslen, *(cmb++), &slen);
435
            (void)apr_conv_ucs2_to_utf8(argv[i], &wslen, *(cmb++), &slen);
436
        }
436
        }
437
437
Lines 485-491 Link Here
485
        char **cmb_data;
485
        char **cmb_data;
486
486
487
        mpm_new_argv->nalloc = mpm_new_argv->nelts + argc - 1;
487
        mpm_new_argv->nalloc = mpm_new_argv->nelts + argc - 1;
488
        cmb_data = malloc(mpm_new_argv->nalloc * sizeof(const char *));
488
        cmb_data = ap_malloc(mpm_new_argv->nalloc * sizeof(const char *));
489
489
490
        /* mpm_new_argv remains first (of lower significance) */
490
        /* mpm_new_argv remains first (of lower significance) */
491
        memcpy (cmb_data, mpm_new_argv->elts,
491
        memcpy (cmb_data, mpm_new_argv->elts,
Lines 643-649 Link Here
643
     * the service's default arguments (all others override them)...
643
     * the service's default arguments (all others override them)...
644
     */
644
     */
645
    args->nalloc = args->nelts + svc_args->nelts;
645
    args->nalloc = args->nelts + svc_args->nelts;
646
    cmb_data = malloc(args->nalloc * sizeof(const char *));
646
    cmb_data = ap_malloc(args->nalloc * sizeof(const char *));
647
647
648
    /* First three args (argv[0], -f, path) remain first */
648
    /* First three args (argv[0], -f, path) remain first */
649
    memcpy(cmb_data, args->elts, args->elt_size * fixed_args);
649
    memcpy(cmb_data, args->elts, args->elt_size * fixed_args);
Lines 1090-1096 Link Here
1090
#if APR_HAS_UNICODE_FS
1090
#if APR_HAS_UNICODE_FS
1091
    IF_WIN_OS_IS_UNICODE
1091
    IF_WIN_OS_IS_UNICODE
1092
    {
1092
    {
1093
        LPWSTR *start_argv_w = malloc((argc + 1) * sizeof(LPCWSTR));
1093
        LPWSTR *start_argv_w = ap_malloc((argc + 1) * sizeof(LPCWSTR));
1094
        int i;
1094
        int i;
1095
1095
1096
        for (i = 0; i < argc; ++i)
1096
        for (i = 0; i < argc; ++i)
Lines 1097-1103 Link Here
1097
        {
1097
        {
1098
            apr_size_t slen = strlen(argv[i]) + 1;
1098
            apr_size_t slen = strlen(argv[i]) + 1;
1099
            apr_size_t wslen = slen;
1099
            apr_size_t wslen = slen;
1100
            start_argv_w[i] = malloc(wslen * sizeof(WCHAR));
1100
            start_argv_w[i] = ap_malloc(wslen * sizeof(WCHAR));
1101
            rv = apr_conv_utf8_to_ucs2(argv[i], &slen, start_argv_w[i], &wslen);
1101
            rv = apr_conv_utf8_to_ucs2(argv[i], &slen, start_argv_w[i], &wslen);
1102
            if (rv != APR_SUCCESS)
1102
            if (rv != APR_SUCCESS)
1103
                return rv;
1103
                return rv;
Lines 1116-1122 Link Here
1116
#if APR_HAS_ANSI_FS
1116
#if APR_HAS_ANSI_FS
1117
    ELSE_WIN_OS_IS_ANSI
1117
    ELSE_WIN_OS_IS_ANSI
1118
    {
1118
    {
1119
        char **start_argv = malloc((argc + 1) * sizeof(const char *));
1119
        char **start_argv = ap_malloc((argc + 1) * sizeof(const char *));
1120
        memcpy(start_argv, argv, argc * sizeof(const char *));
1120
        memcpy(start_argv, argv, argc * sizeof(const char *));
1121
        start_argv[argc] = NULL;
1121
        start_argv[argc] = NULL;
1122
1122
(-)support/suexec.c (-1 / +1 lines)
Lines 239-245 Link Here
239
239
240
    environ = &empty_ptr; /* VERY safe environment */
240
    environ = &empty_ptr; /* VERY safe environment */
241
241
242
    if ((cleanenv = (char **) calloc(AP_ENVBUF, sizeof(char *))) == NULL) {
242
    if ((cleanenv = (char **) ap_calloc(AP_ENVBUF, sizeof(char *))) == NULL) {
243
        log_err("failed to malloc memory for environment\n");
243
        log_err("failed to malloc memory for environment\n");
244
        exit(123);
244
        exit(123);
245
    }
245
    }

Return to bug 64049