Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

Potential Bug in mod_file_cache.c

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


msrbugzilla at gmail

Jun 13, 2012, 11:46 PM

Post #1 of 1 (118 views)
Permalink
Potential Bug in mod_file_cache.c

I observed a code clone in the following files. The second and third functions type cast the object after allocation using "apr_palloc" while the first function does not. I wonder if this is necessary in the function "create_server_config". Hope it helps.

function : create_server_config @ (file: "httpd-2.4.2/modules/cache/mod_file_cache.c", line: 119)~122
a_server_config *sconf = apr_palloc(p, sizeof(*sconf));

sconf->fileht = apr_hash_make(p);
return sconf;

function : create_setenvif_config @ (file: "httpd-2.4.2/modules/metadata/mod_setenvif.c", line: 135)~138
sei_cfg_rec *new = (sei_cfg_rec *) apr_palloc(p, sizeof(sei_cfg_rec));

new->conditionals = apr_array_make(p, 20, sizeof(sei_entry));
return (void *) new;

function : lb_hb_create_config @ (file: "httpd-2.4.2/modules/proxy/balancers/mod_lbmethod_heartbeat.c", line: 408)~412
lb_hb_ctx_t *ctx = (lb_hb_ctx_t *) apr_palloc(p, sizeof(lb_hb_ctx_t));

ctx->path = ap_server_root_relative(p, "logs/hb.dat");

return ctx;

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.