From f6375b10d04346d0fb5846cf27ad1a99a1b65e2f Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 12 Oct 2023 23:41:05 +0200 Subject: [PATCH 1/2] SingleApplicationPrivate: Use MD5 on macOS for block server name Maximum key size on macOS is PSHMNAMLEN (31). Fixes #178 --- singleapplication_p.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/singleapplication_p.cpp b/singleapplication_p.cpp index 5499203..3709022 100644 --- a/singleapplication_p.cpp +++ b/singleapplication_p.cpp @@ -131,7 +131,12 @@ QString SingleApplicationPrivate::getUsername() void SingleApplicationPrivate::genBlockServerName() { +#ifdef Q_OS_MACOS + // Maximum key size on macOS is PSHMNAMLEN (31). + QCryptographicHash appData( QCryptographicHash::Md5 ); +#else QCryptographicHash appData( QCryptographicHash::Sha256 ); +#endif #if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) appData.addData( "SingleApplication", 17 ); #else From 7332ec4bd776e8f1025ee8a75a41c6abea2d6cf5 Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Fri, 13 Oct 2023 00:57:59 +0300 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bc4a8a..1044c4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.5.1 + +* Bug Fix: Maximum QNativeIpcKey key size on macOS. - _Jonas Kvinge_ + ## 3.5.0 * Switch to the new QNativeIpcKey based QSharedMemory constructor with Qt 6.6 and higher. - _Jonas Kvinge_