[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 12/13: Fixes related to implicit cast warnings
From: |
gnunet |
Subject: |
[libmicrohttpd] 12/13: Fixes related to implicit cast warnings |
Date: |
Wed, 27 Apr 2022 21:25:20 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit dc9a8c4180ff361d963fe9bd70ca4ee0e84fcf12
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Apr 27 21:03:18 2022 +0300
Fixes related to implicit cast warnings
---
src/microhttpd/response.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 0a70c0f7..fd3cd192 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -255,6 +255,8 @@ add_response_header_connection (struct MHD_Response
*response,
return MHD_NO;
/* Additional space for normalisation and zero-termination */
norm_len = value_len + value_len / 2 + 1;
+ if (norm_len >= SSIZE_MAX)
+ return MHD_NO;
buf_size = old_value_len + (size_t) norm_len;
buf = malloc (buf_size);
@@ -1117,6 +1119,8 @@ MHD_create_response_from_fd_at_offset (size_t size,
int fd,
off_t offset)
{
+ if (0 > offset)
+ return NULL;
return MHD_create_response_from_fd_at_offset64 (size,
fd,
(uint64_t) offset);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 03/13: Response from callback: do allow negative return amounts, except predefined values, (continued)
- [libmicrohttpd] 03/13: Response from callback: do allow negative return amounts, except predefined values, gnunet, 2022/04/27
- [libmicrohttpd] 01/13: MHD_itc_clear_(): simplified eventfd version, gnunet, 2022/04/27
- [libmicrohttpd] 08/13: Added new function MHD_get_timeout64s(), gnunet, 2022/04/27
- [libmicrohttpd] 02/13: Fixed compiler warnings of implicit casting, which could change the value, gnunet, 2022/04/27
- [libmicrohttpd] 06/13: Added new function MHD_get_timeout64(), gnunet, 2022/04/27
- [libmicrohttpd] 09/13: daemon: added workaround for 'uncrustify' broken formatting, gnunet, 2022/04/27
- [libmicrohttpd] 07/13: get_timeout_millisec_(): refactoring for readability, gnunet, 2022/04/27
- [libmicrohttpd] 05/13: thread-per-connection: improved timeout handling for 'poll()' mode, fixed short busy-waiting, gnunet, 2022/04/27
- [libmicrohttpd] 10/13: Use new function MHD_get_timeout64() in MHD code, gnunet, 2022/04/27
- [libmicrohttpd] 11/13: mhd_send: added safe default value if sysconf() is broken, gnunet, 2022/04/27
- [libmicrohttpd] 12/13: Fixes related to implicit cast warnings,
gnunet <=
- [libmicrohttpd] 13/13: MHD_get_timeout*(): improved doxy, gnunet, 2022/04/27