From ebe8a1e1ce5e6d8b2ced3e6c282694eeb63f7877 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 2 May 2016 10:04:55 +0200 Subject: Patch for kcoreaddons: a regression caused rand() to be not seeded. KRandom saw a regression in KCoreAddon's 5.21.0 release, which impacts a wide range of applications and use cases. Since the rand() was not seeded, the numbers generated were predictable, which is ugly in games and probably alarming for bluetooth pairing. --- kde/build/kcoreaddons | 1 + kde/patch/kcoreaddons.patch | 5 ++++ .../kcoreaddons/kcoreaddons.kdebug_362161.patch | 27 ++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 kde/build/kcoreaddons create mode 100644 kde/patch/kcoreaddons.patch create mode 100644 kde/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch (limited to 'kde') diff --git a/kde/build/kcoreaddons b/kde/build/kcoreaddons new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/kde/build/kcoreaddons @@ -0,0 +1 @@ +2 diff --git a/kde/patch/kcoreaddons.patch b/kde/patch/kcoreaddons.patch new file mode 100644 index 0000000..ee8ddde --- /dev/null +++ b/kde/patch/kcoreaddons.patch @@ -0,0 +1,5 @@ +# KDEBUG #362161 (fixed in Frameworks 5.22.0): +# Fixes regression introduced in 9ae6d765b37135bbfe3a8b936e5a88b8a435e424 +# Since the rand() was not seeded, the numbers generated were predictable. +cat $CWD/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; } + diff --git a/kde/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch b/kde/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch new file mode 100644 index 0000000..31bbcf7 --- /dev/null +++ b/kde/patch/kcoreaddons/kcoreaddons.kdebug_362161.patch @@ -0,0 +1,27 @@ +From: Albert Astals Cid +Date: Tue, 26 Apr 2016 21:41:27 +0000 +Subject: Missing rand() -> qrand +X-Git-Url: http://quickgit.kde.org/?p=kcoreaddons.git&a=commitdiff&h=78212436643af95779facd9593c82fb149c2213d +--- +Missing rand() -> qrand + +Fixes regression introduced in 9ae6d765b37135bbfe3a8b936e5a88b8a435e424 + +Reviewed by Aleix + +BUGS: 362161 +--- + + +--- a/src/lib/randomness/krandom.cpp ++++ b/src/lib/randomness/krandom.cpp +@@ -51,7 +51,7 @@ + } + qsrand(seed); + } +- return rand(); ++ return qrand(); + } + + QString KRandom::randomString(int length) + -- cgit v1.2.3