From 26663277f40e51dc79adfb4ab11fac0e8f4f6edb Mon Sep 17 00:00:00 2001 From: Vitezslav Crhonek Date: Thu, 2 Aug 2018 12:53:28 +0200 Subject: [PATCH] Fix issues detected by static analysis --- tix-8.4.3-covscan-fixes.patch | 47 +++++++++++++++++++++++++++++++++++ tix.spec | 7 +++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 tix-8.4.3-covscan-fixes.patch diff --git a/tix-8.4.3-covscan-fixes.patch b/tix-8.4.3-covscan-fixes.patch new file mode 100644 index 0000000..244de12 --- /dev/null +++ b/tix-8.4.3-covscan-fixes.patch @@ -0,0 +1,47 @@ +diff -up Tix8.4.3/generic/tixGrUtl.c.orig Tix8.4.3/generic/tixGrUtl.c +--- Tix8.4.3/generic/tixGrUtl.c.orig 2004-03-28 04:44:56.000000000 +0200 ++++ Tix8.4.3/generic/tixGrUtl.c 2018-08-01 14:49:18.839262337 +0200 +@@ -191,7 +191,7 @@ int Tix_GrConfigSize(interp, wPtr, argc, + if (sizePtr->charValue != newSize.charValue) { + changed = 1; + } +- if (sizePtr->pad1 != newSize.pad0) { ++ if (sizePtr->pad0 != newSize.pad0) { + changed = 1; + } + if (sizePtr->pad1 != newSize.pad1) { +diff -up Tix8.4.3/generic/tix.h.orig Tix8.4.3/generic/tix.h +--- Tix8.4.3/generic/tix.h.orig 2008-02-28 05:35:16.000000000 +0100 ++++ Tix8.4.3/generic/tix.h 2018-08-01 14:45:03.306004016 +0200 +@@ -39,6 +39,7 @@ extern "C" { + #endif + #ifdef HAVE_STDLIB_H + #include ++#include + #endif + + #ifndef CONST84 +diff -up Tix8.4.3/Python/Demo/tix/samples/CmpImg.py.orig Tix8.4.3/Python/Demo/tix/samples/CmpImg.py +--- Tix8.4.3/Python/Demo/tix/samples/CmpImg.py.orig 2001-12-10 00:29:43.000000000 +0100 ++++ Tix8.4.3/Python/Demo/tix/samples/CmpImg.py 2018-08-01 14:49:57.959301881 +0200 +@@ -148,7 +148,7 @@ def RunSample(w): + if not w.img0: + w.img0 = Tix.Image('bitmap', data=network_bitmap) + w.img1 = Tix.Image('pixmap', data=hard_disk_pixmap) +- if not w.img0: ++ if not w.img1: + w.img1 = Tix.Image('bitmap', data=hard_disk_bitmap) + + hdd = Tix.Button(w, padx=4, pady=1, width=120) +diff -up Tix8.4.3/PyTix-2.0/demos/samples/CmpImg.py.orig Tix8.4.3/PyTix-2.0/demos/samples/CmpImg.py +--- Tix8.4.3/PyTix-2.0/demos/samples/CmpImg.py.orig 2000-11-05 20:57:44.000000000 +0100 ++++ Tix8.4.3/PyTix-2.0/demos/samples/CmpImg.py 2018-08-01 14:50:14.934319043 +0200 +@@ -148,7 +148,7 @@ def RunSample(w): + if not w.img0: + w.img0 = Tix.Image('bitmap', data=network_bitmap) + w.img1 = Tix.Image('pixmap', data=hard_disk_pixmap) +- if not w.img0: ++ if not w.img1: + w.img1 = Tix.Image('bitmap', data=hard_disk_bitmap) + + hdd = Tix.Button(w, padx=4, pady=1, width=120) diff --git a/tix.spec b/tix.spec index 19dff90..de114ec 100644 --- a/tix.spec +++ b/tix.spec @@ -8,13 +8,14 @@ Summary: A set of extension widgets for Tk Name: tix Epoch: 1 Version: %{tixmajor}.3 -Release: 24%{?dist} +Release: 25%{?dist} License: TCL URL: http://tix.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/Tix%{version}-src.tar.gz # 0: Fixes BZ#81297 (soname of libraries) Patch0: tix-8.4.2-link.patch Patch1: tix-8.4.3-tcl86.patch +Patch2: tix-8.4.3-covscan-fixes.patch Requires: tcl(abi) = 8.6 Requires: tcl >= %{tcltkver}, tk >= %{tcltkver} Requires: /etc/ld.so.conf.d @@ -57,6 +58,7 @@ This package contains the tix documentation %setup -q -n Tix%{version} %patch0 -p1 -b .link %patch1 -p1 -b .tcl86 +%patch2 -p1 -b .covscan-fixes # Remove executable permission of images in html documentation chmod ugo-x docs/html/gif/tix/*.png docs/html/gif/tix/*.gif \ @@ -125,6 +127,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/Tix%{tixmajor}/license.terms %doc %{tcl_sitelib}/Tix%{tixmajor} %changelog +* Thu Aug 02 2018 Vitezslav Crhonek - 1:8.4.3-25 +- Fix issues detected by static analysis + * Sat Jul 14 2018 Fedora Release Engineering - 1:8.4.3-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild