This commit is contained in:
Zdenek Dohnal 2020-11-05 10:01:04 +01:00
parent 76682b3284
commit 69ea9feaab
4 changed files with 20 additions and 26 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ libpaper_1.1.24.tar.gz
/libpaper_1.1.24+nmu1.tar.gz
/libpaper_1.1.24+nmu3.tar.gz
/libpaper_1.1.24+nmu4.tar.gz
/libpaper_1.1.28.tar.gz

View File

@ -1,16 +0,0 @@
diff --git a/lib/paper.c b/lib/paper.c
index 57db599..8817aea 100644
--- a/lib/paper.c
+++ b/lib/paper.c
@@ -211,7 +211,10 @@ PAPERSIZEVAR, fall-back to the old behaviour.
fclose(ps);
paperstr = malloc((strlen(papername) + 1) * sizeof(char));
- if (! paperstr) return 0;
+ if (! paperstr) {
+ free(papername);
+ return 0;
+ }
strcpy(paperstr, papername);
free(papername);

View File

@ -1,21 +1,29 @@
%global nmu +nmu4
#%%global nmu +nmu4
Name: libpaper
Version: 1.1.24
Release: 28%{?dist}
Version: 1.1.28
Release: 1%{?dist}
Summary: Library and tools for handling papersize
License: GPLv2
URL: http://packages.qa.debian.org/libp/libpaper.html
Source0: http://ftp.debian.org/debian/pool/main/libp/libpaper/%{name}_%{version}%{nmu}.tar.gz
Source0: http://ftp.debian.org/debian/pool/main/libp/libpaper/%{name}_%{version}.tar.gz
# Filed upstream as:
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481213
Patch2: libpaper-useglibcfallback.patch
# Memory leak
Patch3: libpaper-file-leak.patch
# memory leak found by covscan, reported to debian upstream
Patch4: libpaper-covscan.patch
#Patch4: libpaper-covscan.patch
# gcc is no longer in buildroot by default
BuildRequires: gcc
# use git for autosetup
BuildRequires: git-core
# uses make
BuildRequires: make
BuildRequires: libtool, gettext, gawk
%description
@ -35,15 +43,13 @@ This package contains headers and libraries that programmers will need
to develop applications which use libpaper.
%prep
%setup -q -n %{name}-%{version}%{nmu}
%patch2 -p1 -b .useglibcfallback
%patch3 -p1 -b .file-leak
%patch4 -p1 -b .covscan
%autosetup -S git
libtoolize
%build
touch AUTHORS NEWS
aclocal
autoheader
autoconf
automake -a
%configure --disable-static
@ -85,6 +91,9 @@ done
%{_mandir}/man3/*
%changelog
* Thu Nov 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.1.28-1
- 1.1.28
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.24-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

View File

@ -1 +1 @@
155d2e589e2f4ef163de8fbbc5d3dd1e libpaper_1.1.24+nmu4.tar.gz
SHA512 (libpaper_1.1.28.tar.gz) = 3bf6ebb0af89931d2f72ea4a09a7fa958b2facda5f238983ec7bac39652e08614b33f0de3af74a03457b2a4203eee4950bf18a4b726e79aa64093ace6a1fb0bc