mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
security/p5-Crypt-OpenSSL-X509: Fix [-Werror=logical-not-parentheses]
This bug was first discovered by Fedora 22 team building with gcc5 and they reported it upstream: https://github.com/dsully/perl-crypt-openssl-x509/issues/39 I believe this patch is equivalent but a bit nicer than the fix suggested there. The problem is "not (c < 0)" is desired but "(not c) < 0)" is what the condition evaluates to. The joy of C. Approved by: Just fix it
This commit is contained in:
parent
0fab25a3e2
commit
a4c576c273
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=379605
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= Crypt-OpenSSL-X509
|
||||
PORTVERSION= 1.8.04
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= security perl5
|
||||
MASTER_SITES= CPAN
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
20
security/p5-Crypt-OpenSSL-X509/files/patch-X509.xs
Normal file
20
security/p5-Crypt-OpenSSL-X509/files/patch-X509.xs
Normal file
@ -0,0 +1,20 @@
|
||||
--- X509.xs.orig 2013-12-01 17:14:25 UTC
|
||||
+++ X509.xs
|
||||
@@ -181,7 +181,7 @@ static HV* hv_exts(X509* x509, int no_na
|
||||
sv_2mortal((SV*)RETVAL);
|
||||
c = X509_get_ext_count(x509);
|
||||
|
||||
- if ( ! c > 0 ) {
|
||||
+ if ( c <= 0 ) {
|
||||
croak("No extensions found\n");
|
||||
}
|
||||
|
||||
@@ -860,7 +860,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");
|
Loading…
Reference in New Issue
Block a user