From: Holger Schemel Date: Thu, 10 Feb 2022 08:34:49 +0000 (+0100) Subject: fixed HTTP buffer size X-Git-Tag: 4.3.2.0~136 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=383c7a80321f8dbdbad10a36f8f2c77ebbd01ca6;p=rocksndiamonds.git fixed HTTP buffer size --- 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;