[gdm/gnome-2-30] Call XdmcpFill with properly initialized length



commit ba72008ee335890963eead03e16d0503afba3ea0
Author: Ray Strode <rstrode redhat com>
Date:   Thu Jun 17 11:59:36 2010 -0400

    Call XdmcpFill with properly initialized length
    
    This is just like commit 86ac166294f0fc8f662031167066acf1928cf139,
    but in a different place in the code.
    
    Spotted by mariodebian <mariodebian gmail com>
    (cherry picked from commit f7a7158efcaa3e113a02dd0f0bfdf22a253928e5)

 gui/simple-chooser/gdm-host-chooser-widget.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gui/simple-chooser/gdm-host-chooser-widget.c b/gui/simple-chooser/gdm-host-chooser-widget.c
index 0c8f46c..352c1e2 100644
--- a/gui/simple-chooser/gdm-host-chooser-widget.c
+++ b/gui/simple-chooser/gdm-host-chooser-widget.c
@@ -208,12 +208,13 @@ decode_packet (GIOChannel           *source,
                 return TRUE;
         }
 
+        ss_len = (int)gdm_sockaddr_len (&clnt_ss);
+
         res = XdmcpFill (widget->priv->socket_fd, &buf, (XdmcpNetaddr)&clnt_ss, &ss_len);
         if G_UNLIKELY (! res) {
                 g_debug (_("XDMCP: Could not create XDMCP buffer!"));
                 return TRUE;
         }
-        ss_len = (int)gdm_sockaddr_len (&clnt_ss);
 
         res = XdmcpReadHeader (&buf, &header);
         if G_UNLIKELY (! res) {



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