Fix error in addrlen field
addrlen must be initialize to the amount of space available in the buffer. Change-Id: I52945d780bba9d22aeaa7ac5a35a0e54dbea60dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
361cd9f9b2
commit
c354b4f12f
@ -215,7 +215,7 @@ bool QLocalServerPrivate::listen(qintptr socketDescriptor)
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
struct ::sockaddr_un addr;
|
||||
socklen_t len;
|
||||
QT_SOCKLEN_T len = sizeof(addr);
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
if (0 == ::getsockname(listenSocket, (sockaddr *)&addr, &len)) {
|
||||
// check for absract sockets
|
||||
|
Loading…
Reference in New Issue
Block a user