gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] branch master updated: The proper fix for MHD_get_connec


From: gnunet
Subject: [libmicrohttpd] branch master updated: The proper fix for MHD_get_connection_info()
Date: Thu, 25 May 2023 11:04:50 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 31ce530d The proper fix for MHD_get_connection_info()
31ce530d is described below

commit 31ce530d6b9757f5489aa943d53553dc8a045f20
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu May 25 12:04:03 2023 +0300

    The proper fix for MHD_get_connection_info()
    
    This is a correction for 35c9e7189e9167e8ba3db65fdf404691643ad695
---
 src/microhttpd/connection.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 5899ffaf..7f07a867 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -5432,11 +5432,11 @@ MHD_get_connection_info (struct MHD_Connection 
*connection,
   case MHD_CONNECTION_INFO_CLIENT_ADDRESS:
     if (0 < connection->addr_len)
     {
-      memset (&connection->connection_info_dummy.client_addr, 0,
-              sizeof (connection->connection_info_dummy.client_addr));
+      mhd_assert (sizeof (connection->addr) == \
+                  sizeof (connection->connection_info_dummy.client_addr));
       memcpy (&connection->connection_info_dummy.client_addr,
-              connection->addr,
-              (size_t) connection->addr_len);
+              &connection->addr,
+              sizeof(connection->addr));
       return &connection->connection_info_dummy;
     }
     return NULL;

-- 
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]