From 6dbcd2ba19a103da615125190d154b5348bd8997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Sun, 29 Sep 2024 21:40:17 +0200 Subject: [PATCH] Fix buffer overflow when registering a dedicated build server on MS --- src/dedicated/i_threads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dedicated/i_threads.c b/src/dedicated/i_threads.c index 6902e23a5..55c0a069e 100644 --- a/src/dedicated/i_threads.c +++ b/src/dedicated/i_threads.c @@ -157,7 +157,7 @@ void I_wake_all_cond(I_cond *anchor) pthread_mutex_lock(&thread_lock); if (*anchor == NULL) { - *anchor = malloc(sizeof(pthread_t)); + *anchor = malloc(sizeof(pthread_cond_t)); pthread_cond_init(*anchor, NULL); } pthread_mutex_unlock(&thread_lock);