Zero-init the deny list also.

Spotted by @jw, thank you.

Triggered a SIGSEGV on ubuntu jammy:

 #7  0x000056244a253026 in child_signal_handler (s=11, si=0x7f2e4190caf0, c=0x7f2e4190c9c0) at cache/cache_main.c:326
 #8  <signal handler called>
 #9  0x000056244a289d10 in VRT_Assign_Backend (dst=0x56244bd741f8, src=0x56244bd71320) at cache/cache_vrt_vcl.c:310
 #10 0x00007f2e3c37485a in vmod_cluster__init (ctx=0x56244a3c62c0 <ctx_cli>, vcp=0x7f2e3c39f2e0, vcl_name=0x7f2e3c3981e3 "cl",
     args=0x7ffe77bd5de0) at vmod_cluster.c:412
 #11 0x00007f2e3c395477 in VGC_function_vcl_init (ctx=0x56244bd741f8, call=<optimized out>, failp=<optimized out>) at vgc.c:4493
 #12 0x00007f2e3c3971f9 in VGC_Load (ctx=<optimized out>) at vgc.c:5053
 #13 VGC_Event (ctx=0x56244a3c62c0 <ctx_cli>, ev=<optimized out>) at vgc.c:5164
 #14 0x000056244a26e906 in vcl_send_event (vcl=0x56244bd70790, ev=VCL_EVENT_LOAD, msg=0x7ffe77bd5ec0) at cache/cache_vcl.c:255
 #15 0x000056244a2709ad in vcl_load (cli=0x56244bd6f630, name=0x56244bd6f7f0 "vcl1",
     fn=0x56244bd6f810 "vcl_vcl1.1704555267.272190/vgc.so", state=0x56244bd6f840 "1auto") at cache/cache_vcl.c:696
parent f0ef8335
......@@ -132,7 +132,8 @@ cluster_task_param_init(struct vmod_cluster_cluster_param *p, size_t sz)
AN(p);
assert(sz > sizeof *p);
INIT_OBJ(p, VMOD_CLUSTER_CLUSTER_PARAM_MAGIC);
memset(p, 0, sz);
p->magic = VMOD_CLUSTER_CLUSTER_PARAM_MAGIC;
p->spcdeny = (sz - sizeof *p) / sizeof *p->denylist;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment