diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2014-01-30 02:31:39 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-12-17 21:45:01 +0100 |
commit | 520513b62f6d85d1092dc77689fbdcdc7535b2d4 (patch) | |
tree | 913546d131f35d9fb5188392e1382ddd0d1c3691 /tqdbusmarshall.cpp | |
parent | f0b3aa3748e1aa76b8de6af6eac7c85326e6249c (diff) | |
download | dbus-1-tqt-520513b62f6d85d1092dc77689fbdcdc7535b2d4.tar.gz dbus-1-tqt-520513b62f6d85d1092dc77689fbdcdc7535b2d4.zip |
Fix duplication UnixFD during demarshall
Fix uninitialized UnixFD private data
(cherry picked from commit 89be80257477233dbda99a22d5afb560898b513e)
Diffstat (limited to 'tqdbusmarshall.cpp')
-rw-r--r-- | tqdbusmarshall.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tqdbusmarshall.cpp b/tqdbusmarshall.cpp index 91095bf..625b9b6 100644 --- a/tqdbusmarshall.cpp +++ b/tqdbusmarshall.cpp @@ -599,8 +599,11 @@ static TQT_DBusData qFetchParameter(DBusMessageIter *it) return TQT_DBusData::fromStruct(memberList); } - case DBUS_TYPE_UNIX_FD: - return TQT_DBusData::fromUnixFd(TQT_DBusUnixFd(qIterGet<dbus_uint32_t>(it))); + case DBUS_TYPE_UNIX_FD: { + TQT_DBusUnixFd unixFd; + unixFd.giveFileDescriptor(qIterGet<dbus_uint32_t>(it)); + return TQT_DBusData::fromUnixFd(unixFd); + } #if 0 case DBUS_TYPE_INVALID: // TODO: check if there is better way to detect empty arrays |