Fix the hex digit size for SHA1 on msc_crypt implementation

Fix #1354
This commit is contained in:
Felipe Zimmerle
2017-05-22 18:46:07 -03:00
parent a249574692
commit 6f49bad748
2 changed files with 3 additions and 1 deletions

View File

@@ -189,7 +189,7 @@ char *hmac(modsec_rec *msr, const char *key, int key_len,
unsigned char hmac_ipad[HMAC_PAD_SIZE], hmac_opad[HMAC_PAD_SIZE];
unsigned char nkey[APR_SHA1_DIGESTSIZE];
unsigned char *hmac_key = (unsigned char *) key;
char hex_digest[APR_SHA1_DIGESTSIZE * 2], *hmac_digest;
char hex_digest[APR_SHA1_DIGESTSIZE * 2 + 1], *hmac_digest;
const char hex[] = "0123456789abcdef";
int i;