projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
145cec3
)
Set optlen before calling getsockopt
author
Alexander Larsson
<alexl@redhat.com>
Thu, 14 May 2009 14:19:07 +0000
(16:19 +0200)
committer
Alexander Larsson
<alexl@redhat.com>
Thu, 14 May 2009 14:19:07 +0000
(16:19 +0200)
We were sometimes failing in g_socket_check_pending_error because
we were not setting optlen on input and it was sometimes randomly
less than sizeof(int).
gio/gsocket.c
patch
|
blob
|
history
diff --git
a/gio/gsocket.c
b/gio/gsocket.c
index
ba78e24
..
059f14e
100644
(file)
--- a/
gio/gsocket.c
+++ b/
gio/gsocket.c
@@
-1501,6
+1501,7
@@
g_socket_check_pending_error (GSocket *socket,
guint optlen;
int value;
+ optlen = sizeof (value);
if (getsockopt (socket->priv->fd, SOL_SOCKET, SO_ERROR, (void *)&value, &optlen) != 0)
{
int errsv = get_socket_errno ();