Commit 3b8459d7 authored by Nils Goroll's avatar Nils Goroll

assert an initialized blob for hmac constructor

parent e9da277d
...@@ -428,6 +428,9 @@ vmod_hmac__init(VRT_CTX, struct vmod_blobdigest_hmac **hmacp, ...@@ -428,6 +428,9 @@ vmod_hmac__init(VRT_CTX, struct vmod_blobdigest_hmac **hmacp,
hmac->hash = hash; hmac->hash = hash;
hmac->vcl_name = strdup(vcl_name); hmac->vcl_name = strdup(vcl_name);
AN(key);
AN(key->priv);
memset(k, 0, blocksz); memset(k, 0, blocksz);
if (key->len <= blocksz) if (key->len <= blocksz)
memcpy(k, key->priv, key->len); memcpy(k, key->priv, key->len);
......
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