Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
175132e8f8 |
5 changed files with 19 additions and 53 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@
|
||||||
/ckb-next-0.4.3.tar.gz
|
/ckb-next-0.4.3.tar.gz
|
||||||
/ckb-next-0.4.4.tar.gz
|
/ckb-next-0.4.4.tar.gz
|
||||||
/ckb-next-0.5.0.tar.gz
|
/ckb-next-0.5.0.tar.gz
|
||||||
|
/ckb-next-0.6.0.tar.gz
|
||||||
|
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
From c29a9f5e314ddb987b75cb05793ae1bf2bb9ae0c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tasos Sahanidis <tasos@tasossah.com>
|
|
||||||
Date: Sat, 18 Mar 2023 16:13:51 +0200
|
|
||||||
Subject: [PATCH] Fix buffer overflow detected with _FORTIFY_SOURCE
|
|
||||||
|
|
||||||
Technically there's no buffer overflow taking place, but the size
|
|
||||||
argument passed to snprintf was incorrect.
|
|
||||||
|
|
||||||
Closes #940
|
|
||||||
---
|
|
||||||
src/daemon/device_bragi.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/daemon/device_bragi.c b/src/daemon/device_bragi.c
|
|
||||||
index e0690d32..8de99570 100644
|
|
||||||
--- a/src/daemon/device_bragi.c
|
|
||||||
+++ b/src/daemon/device_bragi.c
|
|
||||||
@@ -178,8 +178,8 @@ static int start_bragi_common(usbdevice* kb){
|
|
||||||
}
|
|
||||||
|
|
||||||
char str[PAIR_ID_SIZE*3+1] = {0};
|
|
||||||
- for(uint32_t i = 0; i < PAIR_ID_SIZE; i++)
|
|
||||||
- snprintf(str + i * 3, sizeof(str), "%02hhx ", kb->wl_pairing_id[i]);
|
|
||||||
+ for(int i = 0; i < PAIR_ID_SIZE; i++)
|
|
||||||
+ snprintf(str + i * 3, sizeof(str) - i * 3, "%02hhx ", kb->wl_pairing_id[i]);
|
|
||||||
|
|
||||||
ckb_info("ckb%d: Pairing id: %s", INDEX_OF(kb, keyboard), str);
|
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
diff -r -U4 ckb-next-0.5.0--orig/src/animations/mviz/CMakeLists.txt ckb-next-0.5.0--patched/src/animations/mviz/CMakeLists.txt
|
diff -r -U4 ckb-next-0.6.0--orig/src/animations/mviz/CMakeLists.txt ckb-next-0.6.0--patched/src/animations/mviz/CMakeLists.txt
|
||||||
--- ckb-next-0.5.0--orig/src/animations/mviz/CMakeLists.txt 2022-05-27 12:30:46.000000000 +0200
|
--- ckb-next-0.6.0--orig/src/animations/mviz/CMakeLists.txt 2023-06-22 23:07:29.000000000 +0200
|
||||||
+++ ckb-next-0.5.0--patched/src/animations/mviz/CMakeLists.txt 2023-05-02 13:32:28.810939157 +0200
|
+++ ckb-next-0.6.0--patched/src/animations/mviz/CMakeLists.txt 2023-06-25 22:59:31.481115661 +0200
|
||||||
@@ -65,14 +65,18 @@
|
@@ -65,14 +65,18 @@
|
||||||
|
|
||||||
set(AUDIO_LIBRARIES "${PULSEAUDIOSIMPLE_LIBRARIES}")
|
set(AUDIO_LIBRARIES "${PULSEAUDIO_LIBRARIES}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
+add_library(kissfft STATIC IMPORTED)
|
+add_library(kissfft STATIC IMPORTED)
|
||||||
|
|
@ -33,10 +33,10 @@ diff -r -U4 ckb-next-0.5.0--orig/src/animations/mviz/CMakeLists.txt ckb-next-0.5
|
||||||
"${AUDIO_LIBRARIES}")
|
"${AUDIO_LIBRARIES}")
|
||||||
else()
|
else()
|
||||||
message(WARNING "PortAudio link library has not been specified for this OS.")
|
message(WARNING "PortAudio link library has not been specified for this OS.")
|
||||||
diff -r -U4 ckb-next-0.5.0--orig/src/libs/CMakeLists.txt ckb-next-0.5.0--patched/src/libs/CMakeLists.txt
|
diff -r -U4 ckb-next-0.6.0--orig/src/libs/CMakeLists.txt ckb-next-0.6.0--patched/src/libs/CMakeLists.txt
|
||||||
--- ckb-next-0.5.0--orig/src/libs/CMakeLists.txt 2022-05-27 12:30:46.000000000 +0200
|
--- ckb-next-0.6.0--orig/src/libs/CMakeLists.txt 2023-06-22 23:07:29.000000000 +0200
|
||||||
+++ ckb-next-0.5.0--patched/src/libs/CMakeLists.txt 2023-05-02 13:02:24.305285201 +0200
|
+++ ckb-next-0.6.0--patched/src/libs/CMakeLists.txt 2023-06-25 22:59:56.191319405 +0200
|
||||||
@@ -24,12 +24,8 @@
|
@@ -24,10 +24,6 @@
|
||||||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
@ -45,7 +45,5 @@ diff -r -U4 ckb-next-0.5.0--orig/src/libs/CMakeLists.txt ckb-next-0.5.0--patched
|
||||||
- add_subdirectory(kissfft)
|
- add_subdirectory(kissfft)
|
||||||
-endif ()
|
-endif ()
|
||||||
-
|
-
|
||||||
if (WITH_GUI)
|
# ckb-next libraries
|
||||||
find_package(QuaZip)
|
add_subdirectory(ckb-next)
|
||||||
if(NOT QuaZip_FOUND)
|
|
||||||
set(WITH_SHIPPED_QUAZIP ON)
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
Name: ckb-next
|
Name: ckb-next
|
||||||
Version: 0.5.0
|
Version: 0.6.0
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Unofficial driver for Corsair RGB keyboards
|
Summary: Unofficial driver for Corsair RGB keyboards
|
||||||
|
|
||||||
# ckb-next is GPLv2.
|
# ckb-next is GPLv2.
|
||||||
|
|
@ -18,14 +18,6 @@ Source1: ckb-next.appdata.xml
|
||||||
Source2: ckb-next.1
|
Source2: ckb-next.1
|
||||||
Source3: 99-ckb-next.preset
|
Source3: 99-ckb-next.preset
|
||||||
|
|
||||||
# Fix the program aborting at launch because of a detected buffer overflow.
|
|
||||||
# Backport of upstream commit:
|
|
||||||
# https://github.com/ckb-next/ckb-next/commit/c29a9f5e314ddb987b75cb05793ae1bf2bb9ae0c
|
|
||||||
# See bug reports at:
|
|
||||||
# - https://bugzilla.redhat.com/show_bug.cgi?id=2192159
|
|
||||||
# - https://github.com/ckb-next/ckb-next/issues/940
|
|
||||||
Patch0: 0000-fix-buffer-overflow-abort-on-launch.patch
|
|
||||||
|
|
||||||
# CMakeLists need to be adjusted to compile properly with un-bundled kissfft
|
# CMakeLists need to be adjusted to compile properly with un-bundled kissfft
|
||||||
Patch1: 0001-unbundle-kissfft.patch
|
Patch1: 0001-unbundle-kissfft.patch
|
||||||
|
|
||||||
|
|
@ -72,7 +64,6 @@ supports much of the same functionality, including full RGB animations.
|
||||||
|
|
||||||
# Remove the bundled libraries
|
# Remove the bundled libraries
|
||||||
rm -rf src/libs/kissfft
|
rm -rf src/libs/kissfft
|
||||||
rm -rf src/libs/quazip
|
|
||||||
|
|
||||||
# Fedora uses /usr/libexec for daemons
|
# Fedora uses /usr/libexec for daemons
|
||||||
sed -e '/^ExecStart/cExecStart=%{_libexecdir}/ckb-next-daemon' -i linux/systemd/ckb-next-daemon.service.in
|
sed -e '/^ExecStart/cExecStart=%{_libexecdir}/ckb-next-daemon' -i linux/systemd/ckb-next-daemon.service.in
|
||||||
|
|
@ -90,7 +81,6 @@ sed -e 's|"/lib/udev/rules.d"|"%{_udevrulesdir}"|g' -i CMakeLists.txt
|
||||||
-DFORCE_INIT_SYSTEM=systemd \
|
-DFORCE_INIT_SYSTEM=systemd \
|
||||||
-DSAFE_INSTALL=OFF \
|
-DSAFE_INSTALL=OFF \
|
||||||
-DSAFE_UNINSTALL=OFF \
|
-DSAFE_UNINSTALL=OFF \
|
||||||
-DWITH_SHIPPED_QUAZIP=OFF \
|
|
||||||
|
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
|
|
@ -135,6 +125,7 @@ udevadm control --reload-rules 2>&1 > /dev/null || :
|
||||||
%{_bindir}/ckb-next
|
%{_bindir}/ckb-next
|
||||||
%{_bindir}/ckb-next-dev-detect
|
%{_bindir}/ckb-next-dev-detect
|
||||||
%{_libexecdir}/ckb-next-daemon
|
%{_libexecdir}/ckb-next-daemon
|
||||||
|
%{_libexecdir}/ckb-next-sinfo
|
||||||
%{_libexecdir}/ckb-next-animations/
|
%{_libexecdir}/ckb-next-animations/
|
||||||
%{_libdir}/cmake/ckb-next/
|
%{_libdir}/cmake/ckb-next/
|
||||||
%{_datadir}/applications/ckb-next.desktop
|
%{_datadir}/applications/ckb-next.desktop
|
||||||
|
|
@ -149,6 +140,10 @@ udevadm control --reload-rules 2>&1 > /dev/null || :
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jun 25 2023 Artur Frenszek-Iwicki <fedora@svgames.pl> - 0.6.0-1
|
||||||
|
- Update to v0.6.0
|
||||||
|
- Drop Patch0 (buffer overflow fix - backported from this release)
|
||||||
|
|
||||||
* Tue May 02 2023 Artur Frenszek-Iwicki <fedora@svgames.pl> - 0.5.0-4
|
* Tue May 02 2023 Artur Frenszek-Iwicki <fedora@svgames.pl> - 0.5.0-4
|
||||||
- Add a patch to fix program aborting on launch
|
- Add a patch to fix program aborting on launch
|
||||||
- Un-bundle kissfft
|
- Un-bundle kissfft
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (ckb-next-0.5.0.tar.gz) = d4e46466df4cdac7f4d4be05072592101780c94af261ec1b0bf6ec8bb1f97f892fb5da17dd91cf5f9b45fe128547cc7393c13e29843d6a7ae0de7a4688a5cdb1
|
SHA512 (ckb-next-0.6.0.tar.gz) = 34236199d420b663bb71db9400622bb868a3a0b384b58d5da3f80d2bd7ec9586d4e4ac9caad0b047b8440dc4200e4dd6077f4e0d1edb5a75a1327bf9c9ba9392
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue