Skip to content

Commit

Permalink
Eliminate need for TRUST_ME()
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdphk committed Nov 29, 2022
1 parent abe708b commit ee46f6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vmod/vmod_debug_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ setup_sweep(VRT_CTX, struct acl_sweep *asw, VCL_IP ip0, VCL_IP ip1,
}
asw->this = asw->reset;

asw->probe = VSA_Clone(ip0);
/* Dont try this at home */
asw->probe = malloc(vsa_suckaddr_len);
AN(asw->probe);
memcpy(asw->probe, ip0, vsa_suckaddr_len);
(void)VSA_GetPtr(asw->probe, &ptr);
asw->probe_p = TRUST_ME(ptr);
asw->probe_p = ((uint8_t*)(asw->probe)) + (ptr - (uint8_t*)asw->probe);

asw->step = step;

Expand Down

0 comments on commit ee46f6e

Please sign in to comment.