Skip to content

Commit 6f49bad

Browse files
author
Felipe Zimmerle
committed
Fix the hex digit size for SHA1 on msc_crypt implementation
Fix #1354
1 parent a249574 commit 6f49bad

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
DD MMM YYYY - 2.9.2 - To be released
22
------------------------------------
33

4+
* Fix the hex digit size for SHA1 on msc_crypt implementation.
5+
[Issue #1354 - @zimmerle and @parthasarathi204]
46
* Avoid to flush xml buffer while assembling the injected html.
57
[Issue #742 - @zimmerle]
68
* Avoid additional operator invokation if last transform of a multimatch

apache2/msc_crypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ char *hmac(modsec_rec *msr, const char *key, int key_len,
189189
unsigned char hmac_ipad[HMAC_PAD_SIZE], hmac_opad[HMAC_PAD_SIZE];
190190
unsigned char nkey[APR_SHA1_DIGESTSIZE];
191191
unsigned char *hmac_key = (unsigned char *) key;
192-
char hex_digest[APR_SHA1_DIGESTSIZE * 2], *hmac_digest;
192+
char hex_digest[APR_SHA1_DIGESTSIZE * 2 + 1], *hmac_digest;
193193
const char hex[] = "0123456789abcdef";
194194
int i;
195195

0 commit comments

Comments
 (0)