[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-80-g36f1b34ab
mones at claws-mail.org
mones at claws-mail.org
Fri Apr 12 14:39:37 UTC 2024
The branch, gtk2 has been updated
via 36f1b34ab24b72e82028cf2a82769a3b678fbb91 (commit)
from df328fcbb52c10a51aa75ff40757fdb81cb11c4d (commit)
Summary of changes:
src/common/socket.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 36f1b34ab24b72e82028cf2a82769a3b678fbb91
Author: Olaf Hering <olaf at aepfle.de>
Date: Fri Apr 12 16:38:43 2024 +0200
Fix bug 4786 "remove type confusion in getsockopt call in sock_connect_async_cb"
The function getsockopt expects a pointer to an area of memory whose
length has to specified in a variable of type socklen_t.
Adjust the type of optlen to be socklen_t as mandated by POSIX.
Adjust the type of optval pointer to what it really is, it will be
automatically converted to become a void * pointer.
Signed-off-by: Olaf Hering <olaf at aepfle.de>
diff --git a/src/common/socket.c b/src/common/socket.c
index e9d50184b..a63c9a7a8 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -709,7 +709,7 @@ static gboolean sock_connect_async_cb(GIOChannel *source,
SockConnectData *conn_data = (SockConnectData *)data;
gint fd;
gint val;
- guint len;
+ socklen_t len;
SockInfo *sockinfo;
if (conn_data->io_tag == 0 && conn_data->channel == NULL)
@@ -722,7 +722,7 @@ static gboolean sock_connect_async_cb(GIOChannel *source,
g_io_channel_unref(source);
len = sizeof(val);
- if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void*)&val, &len) < 0) {
+ if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &val, &len) < 0) {
perror("getsockopt");
close(fd);
sock_connect_address_list_async(conn_data);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list