[perl-Crypt-OpenSSL-X509] Fix condition negation
Petr Pisar
ppisar at fedoraproject.org
Wed Feb 11 13:20:11 UTC 2015
commit 112dd3866aa52d949e3cb1596f69b43e4e767b0f
Author: Petr Písař <ppisar at redhat.com>
Date: Wed Feb 11 13:26:35 2015 +0100
Fix condition negation
...OpenSSL-X509-1.806-Fix-condition-negation.patch | 44 ++++++++++++++++++++
perl-Crypt-OpenSSL-X509.spec | 9 ++++-
2 files changed, 52 insertions(+), 1 deletions(-)
---
diff --git a/Crypt-OpenSSL-X509-1.806-Fix-condition-negation.patch b/Crypt-OpenSSL-X509-1.806-Fix-condition-negation.patch
new file mode 100644
index 0000000..c671472
--- /dev/null
+++ b/Crypt-OpenSSL-X509-1.806-Fix-condition-negation.patch
@@ -0,0 +1,44 @@
+From e1117f13ef3895a738d2e6edfc288175b3677f77 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Wed, 11 Feb 2015 13:18:38 +0100
+Subject: [PATCH] Fix condition negation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 5.0 correctly warned on missing parathneses in (! c > 0)
+expression. This patch fixes it.
+
+<https://github.com/dsully/perl-crypt-openssl-x509/issues/39>
+<https://bugzilla.redhat.com/show_bug.cgi?id=1190816>
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ X509.xs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/X509.xs b/X509.xs
+index 23f7666..32a1425 100644
+--- a/X509.xs
++++ b/X509.xs
+@@ -181,7 +181,7 @@ static HV* hv_exts(X509* x509, int no_name) {
+ sv_2mortal((SV*)RETVAL);
+ c = X509_get_ext_count(x509);
+
+- if ( ! c > 0 ) {
++ if (!(c > 0)) {
+ croak("No extensions found\n");
+ }
+
+@@ -868,7 +868,7 @@ extension(x509, i)
+
+ c = X509_get_ext_count(x509);
+
+- if (!c > 0) {
++ if (!(c > 0)) {
+ croak("No extensions found\n");
+ } else if (i >= c || i < 0) {
+ croak("Requested extension index out of range\n");
+--
+1.9.3
+
diff --git a/perl-Crypt-OpenSSL-X509.spec b/perl-Crypt-OpenSSL-X509.spec
index 7be4453..0a49c3a 100644
--- a/perl-Crypt-OpenSSL-X509.spec
+++ b/perl-Crypt-OpenSSL-X509.spec
@@ -1,11 +1,14 @@
Name: perl-Crypt-OpenSSL-X509
Version: 1.803
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Perl interface to OpenSSL for X509
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Crypt-OpenSSL-X509/
Source0: http://www.cpan.org/authors/id/D/DA/DANIEL/Crypt-OpenSSL-X509-%{version}.tar.gz
+# Fix condition negation, bug #1190816,
+# <https://github.com/dsully/perl-crypt-openssl-x509/issues/39>
+Patch0: Crypt-OpenSSL-X509-1.806-Fix-condition-negation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: openssl
BuildRequires: openssl-devel
@@ -42,6 +45,7 @@ Crypt::OpenSSL::X509 - Perl extension to OpenSSL's X509 API.
%prep
%setup -q -n Crypt-OpenSSL-X509-%{version}
+%patch0 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -72,6 +76,9 @@ rm -rf %{buildroot}
%{_mandir}/man3/*
%changelog
+* Wed Feb 11 2015 Petr Pisar <ppisar at redhat.com> - 1.803-5
+- Fix condition negation (bug #1190816)
+
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik at redhat.com> - 1.803-4
- Perl 5.20 rebuild
More information about the scm-commits
mailing list