jreznik pushed to taskjuggler (epel7). "Fix reading gzipped XMLs"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 2 16:20:10 UTC 2015


>From 018417fd43da712751a4e41b21f129b4ed98e3e4 Mon Sep 17 00:00:00 2001
From: Radek Novacek <rnovacek at redhat.com>
Date: Mon, 23 Jul 2012 10:24:37 +0200
Subject: Fix reading gzipped XMLs


diff --git a/taskjuggler-2.4.3-fix-reading-gzipped-xml.patch b/taskjuggler-2.4.3-fix-reading-gzipped-xml.patch
new file mode 100644
index 0000000..1fa8611
--- /dev/null
+++ b/taskjuggler-2.4.3-fix-reading-gzipped-xml.patch
@@ -0,0 +1,27 @@
+diff -up taskjuggler-2.4.3/taskjuggler/XMLFile.cpp.fix-reading-gzipped-xml taskjuggler-2.4.3/taskjuggler/XMLFile.cpp
+--- taskjuggler-2.4.3/taskjuggler/XMLFile.cpp.fix-reading-gzipped-xml	2012-07-23 10:20:10.702737841 +0200
++++ taskjuggler-2.4.3/taskjuggler/XMLFile.cpp	2012-07-23 10:21:40.959976220 +0200
+@@ -15,6 +15,7 @@
+ 
+ #include <unistd.h>
+ #include <zlib.h>
++#include <stdlib.h>
+ 
+ #include <qtextstream.h>
+ 
+@@ -312,12 +313,13 @@ XMLFile::readDOM(const QString& file, co
+         tjWarning(i18n("Processing file \'%1\'").arg(file));
+ 
+     QString buf;
++    char *cbuf = (char *) malloc(1024 * sizeof(char));
+     while (!gzeof(zf))
+     {
+-        char cbuf[1024];
+-        gzgets(zf, cbuf, 1024);
++        cbuf = gzgets(zf, cbuf, 1024);
+         buf += cbuf;
+     }
++    free(cbuf);
+     int zError;
+     if ((zError = gzclose(zf)) != 0)
+     {
diff --git a/taskjuggler.spec b/taskjuggler.spec
index b7b27ba..2609762 100644
--- a/taskjuggler.spec
+++ b/taskjuggler.spec
@@ -1,6 +1,6 @@
 Name:          taskjuggler
 Version:       2.4.3
-Release:       11%{?dist}
+Release:       12%{?dist}
 Summary:       Project management tool
 
 Group:         Applications/Productivity
@@ -10,6 +10,8 @@ Source0:       http://www.taskjuggler.org/download/%{name}-%{version}.tar.bz2
 Source1:       %{name}.xml
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+Patch0:        taskjuggler-2.4.3-fix-reading-gzipped-xml.patch
+
 %if 0%{?fedora} < 10 && 0%{?rhel} < 6
 BuildRequires: kdepim-devel
 %else
@@ -45,6 +47,9 @@ Libraries for TaskJuggler package.
 %prep
 %setup -q
 
+# Fix wrong handling memory buffer for reading gzipped xmls
+%patch0 -p1 -b .fix-reading-gzipped-xml
+
 %build
 [ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh
 %configure --with-qt-includes=%{_libdir}/qt-3.3/include --with-qt-libraries=%{_libdir}/qt-3.3/lib --with-kde-support=yes --disable-rpath
@@ -135,6 +140,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_libdir}/libtaskjuggler*
 
 %changelog
+* Mon Jul 23 2012 Radek Novacek <rnovacek at redhat.com> 2.4.3-12
+- Fix reading gzipped XMLs
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.4.3-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/taskjuggler.git/commit/?h=epel7&id=018417fd43da712751a4e41b21f129b4ed98e3e4


More information about the scm-commits mailing list