Skip to content

Commit

Permalink
hexchat: adjust for removal of static buffer from HMAC()
Browse files Browse the repository at this point in the history
  • Loading branch information
botovq committed May 30, 2024
1 parent a1b1bdc commit 9f17265
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion net/hexchat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ V = 2.16.2
DISTNAME = hexchat-$V
EXTRACT_SUFX = .tar.xz
CATEGORIES = net x11
REVISION = 1
REVISION = 2

HOMEPAGE = https://hexchat.github.io/

Expand Down
20 changes: 20 additions & 0 deletions net/hexchat/patches/patch-src_common_util_c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Index: src/common/util.c
--- src/common/util.c.orig
+++ src/common/util.c
@@ -1435,6 +1435,7 @@ challengeauth_response (const char *username, const ch
char *passhash;
char *key;
char *keyhash;
+ unsigned char md[EVP_MAX_MD_SIZE];
unsigned char *digest;
GString *buf = g_string_new_len (NULL, SHA256_DIGEST_LENGTH * 2);

@@ -1451,7 +1452,7 @@ challengeauth_response (const char *username, const ch
keyhash = str_sha256hash (key);
g_free (key);

- digest = HMAC (EVP_sha256 (), keyhash, strlen (keyhash), (unsigned char *) challenge, strlen (challenge), NULL, NULL);
+ digest = HMAC (EVP_sha256 (), keyhash, strlen (keyhash), (unsigned char *) challenge, strlen (challenge), md, NULL);
g_free (keyhash);

for (i = 0; i < SHA256_DIGEST_LENGTH; i++)

0 comments on commit 9f17265

Please sign in to comment.