[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 03/03: response.c: better handle broken situation
From: |
gnunet |
Subject: |
[libmicrohttpd] 03/03: response.c: better handle broken situation |
Date: |
Sun, 29 May 2022 20:36:10 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 8d9eb70d7a040c7aa6d77524a706a4ded147988b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun May 29 16:10:58 2022 +0300
response.c: better handle broken situation
---
src/microhttpd/response.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 13fb253b..e50d2a55 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -273,7 +273,11 @@ add_response_header_connection (struct MHD_Response
*response,
&norm_len_s);
mhd_assert (0 <= norm_len_s);
if (0 > norm_len_s)
- norm_len = 0; /* Must never happen */
+ {
+ /* Must never happen with realistic sizes */
+ free (buf);
+ return MHD_NO;
+ }
else
norm_len = (size_t) norm_len_s;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.