From 383c7a80321f8dbdbad10a36f8f2c77ebbd01ca6 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 10 Feb 2022 09:34:49 +0100 Subject: [PATCH] fixed HTTP buffer size --- src/libgame/http.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libgame/http.c b/src/libgame/http.c index 0064bc14..333ef2a3 100644 --- a/src/libgame/http.c +++ b/src/libgame/http.c @@ -393,9 +393,9 @@ static boolean DoHttpRequestExt(struct HttpRequest *request, boolean DoHttpRequest(struct HttpRequest *request, struct HttpResponse *response) { - int max_http_buffer_size = MAX_HTTP_HEAD_SIZE + MAX_HTTP_BODY_SIZE; - char *send_buffer = checked_malloc(max_http_buffer_size + 1); - char *recv_buffer = checked_malloc(max_http_buffer_size + 1); + int max_http_buffer_size = MAX_HTTP_HEAD_SIZE + 2 + MAX_HTTP_BODY_SIZE + 1; + char *send_buffer = checked_malloc(max_http_buffer_size); + char *recv_buffer = checked_malloc(max_http_buffer_size); SDLNet_SocketSet socket_set = NULL; TCPsocket socket = NULL; -- 2.34.1