Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Commit

Permalink
Safety checks
Browse files Browse the repository at this point in the history
  • Loading branch information
rezan committed Jul 6, 2016
1 parent 53920fc commit d507a7b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/vmod_null.c
Expand Up @@ -7,9 +7,15 @@
VCL_VOID
vmod_synth(const struct vrt_ctx *ctx, VCL_STRING name, VCL_INT len)
{
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);

assert(ctx->method == VCL_MET_SYNTH ||
ctx->method == VCL_MET_BACKEND_ERROR);

if (name == NULL || len <= 0) {
return;
}

CHECK_OBJ_NOTNULL((struct vsb*)ctx->specific, VSB_MAGIC);

VSB_bcat((struct vsb*)ctx->specific, name, len);
Expand Down

0 comments on commit d507a7b

Please sign in to comment.