public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/monsterz] f45: Patch for integer overflow
@ 2026-10-20 15:22 Gwyn Ciesla
  0 siblings, 0 replies; only message in thread
From: Gwyn Ciesla @ 2026-10-20 15:22 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/monsterz
Branch : f45
Commit : 03cae141a39c5f5ff450e3eeb04d52340f9823aa
Author : Gwyn Ciesla <gwync@protonmail.com>
Date   : 2026-10-20T10:21:17-05:00
Stats  : +17/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/monsterz/c/03cae141a39c5f5ff450e3eeb04d52340f9823aa?branch=f45

Log:
Patch for integer overflow

---
diff --git a/intoverflow.patch b/intoverflow.patch
new file mode 100644
index 0000000..a721691
--- /dev/null
+++ b/intoverflow.patch
@@ -0,0 +1,11 @@
+--- monsterz.py~	2026-10-19 15:41:23.509147405 -0500
++++ monsterz.py	2026-10-19 16:04:08.514041187 -0500
+@@ -108,7 +108,7 @@
+                 r, g, b = p
+                 M = int(max(r, g, b))
+                 m = int(min(r, g, b))
+-                val = (2 * M + r + g + b) // 5
++                val = (2 * M + int(r) + int(g) + int(b)) // 5
+                 if sys.maxsize > 2**32 : p[:] = (val + r) / 2, (val + g) / 2, (val + b) / 2
+                 if alpha[y][x] >= 250:
+                     alpha[y][x] = 255 - (M - m) * 3 // 4

diff --git a/monsterz.spec b/monsterz.spec
index 9da3fe1..182695e 100644
--- a/monsterz.spec
+++ b/monsterz.spec
@@ -1,6 +1,6 @@
 Name:           monsterz
 Version:        0.7.1
-Release:        41%{?dist}
+Release:        42%{?dist}
 Summary:        Puzzle game, similar to Bejeweled or Zookeeper
 License:        WTFPL
 URL:            http://sam.zoy.org/monsterz/
@@ -10,6 +10,7 @@ Patch0:         %{name}-0.7.1-userpmopts.patch
 Patch1:         %{name}-0.7.1-64bitfix.patch
 Patch2:         %{name}-0.7.1-blit-crash.patch
 Patch3:         %{name}-0.7.1-py3.patch
+Patch4:         intoverflow.patch
 BuildRequires: make
 BuildRequires:  gcc
 BuildRequires:  desktop-file-utils
@@ -34,6 +35,7 @@ board again. Chain reactions earn you even more points.
 %patch -P1 -p1
 %patch -P2 -p0
 %patch -P3 -p1
+%patch -P4 -p0
 %py3_shebang_fix .
 
 %build
@@ -86,6 +88,9 @@ install -pm0644 graphics/icon.png %{buildroot}%{_datadir}/icons/hicolor/64x64/ap
 
 
 %changelog
+* Mon Oct 19 2026 Gwyn Ciesla <gwync@protonmail.com> - 0.7.1-42
+- Patch for integer overflow
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-41
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-20 15:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-20 15:22 [rpms/monsterz] f45: Patch for integer overflow Gwyn Ciesla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox