diff -Nru keepassx-2.0.2/debian/changelog keepassx-2.0.2/debian/changelog --- keepassx-2.0.2/debian/changelog 2016-05-19 17:44:16.000000000 +0000 +++ keepassx-2.0.2/debian/changelog 2016-05-25 11:33:57.000000000 +0000 @@ -1,4 +1,4 @@ -keepassx (2.0.2-1.03~eugenesan~wily1) wily; urgency=medium +keepassx (2.0.2-1.04~eugenesan~wily1) wily; urgency=medium * New upstream release. * Change version format to upstream's on @@ -12,6 +12,7 @@ - debian/patches/0006-sync-with-keepasshttp-1.8.4.1.patch - debian/patches/0007-http-fix-default-tab.patch - debian/patches/0009-Fix-IPv6-support-and-warn-when-binding-fails.patch + - debian/patches/0010-Hopefully-fix-IPv6-on-all-platforms.patch * Import fixes: - 0005-http-don-t-return-entries-that-matched-last-domain.patch - 0008-Print-libXtst-instead-of-libXtest.patch diff -Nru keepassx-2.0.2/debian/patches/0010-Hopefully-fix-IPv6-on-all-platforms.patch keepassx-2.0.2/debian/patches/0010-Hopefully-fix-IPv6-on-all-platforms.patch --- keepassx-2.0.2/debian/patches/0010-Hopefully-fix-IPv6-on-all-platforms.patch 1970-01-01 00:00:00.000000000 +0000 +++ keepassx-2.0.2/debian/patches/0010-Hopefully-fix-IPv6-on-all-platforms.patch 2016-05-25 11:32:35.000000000 +0000 @@ -0,0 +1,76 @@ +From 5dcdb014cdc04327452323ffc180eebc5ca77a12 Mon Sep 17 00:00:00 2001 +From: "Eugene San (eugenesan)" +Date: Tue, 24 May 2016 21:11:33 -0400 +Subject: [PATCH] Hopefully fix IPv6 on all platforms + +--- + src/http/Server.cpp | 20 +++++++++++--------- + 1 file changed, 11 insertions(+), 9 deletions(-) + +diff --git a/src/http/Server.cpp b/src/http/Server.cpp +index 29f63a0..9f9d801 100644 +--- a/src/http/Server.cpp ++++ b/src/http/Server.cpp +@@ -323,23 +323,21 @@ void Server::request_completed(void *, struct MHD_Connection *, + + void Server::start(void) + { +- bool nohost = true; +- struct sockaddr_in6 as; +- struct sockaddr_in6 *ss = &as; +- + if (m_started) + return; + ++ bool nohost = true; + int port = HttpSettings::httpPort(); + + QHostInfo info = QHostInfo::fromName(HttpSettings::httpHost()); + if (!info.addresses().isEmpty()) { ++ void* addrx = NULL; + unsigned int flags = MHD_USE_SELECT_INTERNALLY; + QHostAddress address = info.addresses().first(); + + if (address.protocol() == QAbstractSocket::IPv4Protocol) { +- struct sockaddr_in* addr = (struct sockaddr_in*)ss; +- memset(addr, 0, sizeof(struct sockaddr_in)); ++ struct sockaddr_in *addr = static_cast(calloc(1, sizeof(struct sockaddr_in))); ++ addrx = static_cast(addr); + addr->sin_family = AF_INET; + addr->sin_port = htons(HttpSettings::httpPort()); + addr->sin_addr.s_addr = htonl(address.toIPv4Address()); +@@ -347,8 +345,8 @@ void Server::start(void) + //qWarning("HTTPPlugin: IPv4 host configured"); + } else { + if (MHD_YES == MHD_is_feature_supported(MHD_FEATURE_IPv6)) { +- struct sockaddr_in6* addr = (struct sockaddr_in6*)ss; +- memset(addr, 0, sizeof(struct sockaddr_in6)); ++ struct sockaddr_in6 *addr = static_cast(calloc(1, sizeof(struct sockaddr_in6))); ++ addrx = static_cast(addr); + addr->sin6_family = AF_INET6; + addr->sin6_port = htons(HttpSettings::httpPort()); + memcpy(&addr->sin6_addr, address.toIPv6Address().c, 16); +@@ -370,7 +368,7 @@ void Server::start(void) + MHD_OPTION_NOTIFY_COMPLETED, + this->request_completed, NULL, + MHD_OPTION_SOCK_ADDR, +- ss, ++ addrx, + MHD_OPTION_END))) { + nohost = true; + qWarning("HTTPPlugin: Failed to bind to configured host!"); +@@ -378,7 +376,11 @@ void Server::start(void) + nohost = false; + //qWarning("HTTPPlugin: Binded to configured host."); + } ++ + } ++ ++ if (addrx != NULL) ++ free(addrx); + } + + if (nohost) { +-- +2.7.4 + diff -Nru keepassx-2.0.2/debian/patches/series keepassx-2.0.2/debian/patches/series --- keepassx-2.0.2/debian/patches/series 2016-05-19 17:43:49.000000000 +0000 +++ keepassx-2.0.2/debian/patches/series 2016-05-25 11:32:56.000000000 +0000 @@ -7,3 +7,4 @@ 0007-http-fix-default-tab.patch 0008-Print-libXtst-instead-of-libXtest.patch 0009-Fix-IPv6-support-and-warn-when-binding-fails.patch +0010-Hopefully-fix-IPv6-on-all-platforms.patch