gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]