Fixed heap-buffer-overflow in crypto.createHmac().
diff --git a/njs/njs_crypto.c b/njs/njs_crypto.c
index 0946fb2..de07570 100644
--- a/njs/njs_crypto.c
+++ b/njs/njs_crypto.c
@@ -417,7 +417,7 @@
 
     ctx->alg = alg;
 
-    if (key.length > 64) {
+    if (key.length > sizeof(key_buf)) {
         alg->init(&ctx->u);
         alg->update(&ctx->u, key.start, key.length);
         alg->final(digest, &ctx->u);
@@ -426,7 +426,7 @@
         memset(key_buf + alg->size, 0, sizeof(key_buf) - alg->size);
 
     } else {
-        memcpy(key_buf, key.start, sizeof(key_buf));
+        memcpy(key_buf, key.start, key.length);
         memset(key_buf + key.length, 0, sizeof(key_buf) - key.length);
     }