SHA256
1
0
forked from pool/strongswan

Updating link to change in openSUSE:Factory/strongswan revision 27.0

OBS-URL: https://build.opensuse.org/package/show/network:vpn/strongswan?expand=0&rev=44d1978dfe0d21d11f637ac9d9f5e88e
This commit is contained in:
OBS User buildservice-autocommit 2010-11-18 15:56:31 +00:00 committed by Git OBS Bridge
parent 12e8dea6e7
commit c2d595a3ab
4 changed files with 2 additions and 123 deletions

View File

@ -1,105 +0,0 @@
From 96e2f9f3a70a7c918772f7dde57c6cb8befbc60e Mon Sep 17 00:00:00 2001
From: Martin Willi <martin@revosec.ch>
Date: Fri, 18 Jun 2010 09:18:27 +0200
Subject: [PATCH] snprintf() fixes, version 4.4.0
---
.../credentials/ietf_attributes/ietf_attributes.c | 13 +++++++++++--
src/libstrongswan/utils/identification.c | 12 ++++++++++++
src/pluto/x509.c | 4 ++++
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/src/libstrongswan/credentials/ietf_attributes/ietf_attributes.c b/src/libstrongswan/credentials/ietf_attributes/ietf_attributes.c
index ff3ddeb..de5b85b 100644
--- a/src/libstrongswan/credentials/ietf_attributes/ietf_attributes.c
+++ b/src/libstrongswan/credentials/ietf_attributes/ietf_attributes.c
@@ -159,7 +159,7 @@ static char* get_string(private_ietf_attributes_t *this)
enumerator = this->list->create_enumerator(this->list);
while (enumerator->enumerate(enumerator, &attr))
{
- int written = 0;
+ int written;
if (first)
{
@@ -168,8 +168,12 @@ static char* get_string(private_ietf_attributes_t *this)
else
{
written = snprintf(pos, len, ", ");
+ if (written < 0 || written >= len)
+ {
+ break;
+ }
pos += written;
- len -= written;
+ len -= written;
}
switch (attr->type)
@@ -194,8 +198,13 @@ static char* get_string(private_ietf_attributes_t *this)
break;
}
default:
+ written = 0;
break;
}
+ if (written < 0 || written >= len)
+ {
+ break;
+ }
pos += written;
len -= written;
}
diff --git a/src/libstrongswan/utils/identification.c b/src/libstrongswan/utils/identification.c
index 6a3c393..6ccfa19 100644
--- a/src/libstrongswan/utils/identification.c
+++ b/src/libstrongswan/utils/identification.c
@@ -297,18 +297,30 @@ static void dntoa(chunk_t dn, char *buf, size_t len)
{
written = snprintf(buf, len,"%s=", oid_names[oid].name);
}
+ if (written < 0 || written >= len)
+ {
+ break;
+ }
buf += written;
len -= written;
chunk_printable(data, &printable, '?');
written = snprintf(buf, len, "%.*s", printable.len, printable.ptr);
chunk_free(&printable);
+ if (written < 0 || written >= len)
+ {
+ break;
+ }
buf += written;
len -= written;
if (data.ptr + data.len != dn.ptr + dn.len)
{
written = snprintf(buf, len, ", ");
+ if (written < 0 || written >= len)
+ {
+ break;
+ }
buf += written;
len -= written;
}
diff --git a/src/pluto/x509.c b/src/pluto/x509.c
index 0a29830..0abebc6 100644
--- a/src/pluto/x509.c
+++ b/src/pluto/x509.c
@@ -393,6 +393,10 @@ void list_x509cert_chain(const char *caption, cert_t* cert,
{
written = snprintf(pos, len, ", %Y", id);
}
+ if (written < 0 || written >= len)
+ {
+ break;
+ }
pos += written;
len -= written;
}
--
1.7.0.4

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:df40d9daf963ce4f4bef4177ed02d68c083521b307f52bebb1872c2ded4b2718
size 2863754

View File

@ -1,14 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iQGcBAABAgAGBQJL3c/MAAoJEN9CwXCzTbp386wL+gNDpVVgxsom7LkOyDNGmtyS
kTNI7gwW29aDzoara6wL/BeN38whxkA6d8JJ4XUQhytGcJMr/SA59ghVTjIUnK71
7LtUP1VcTnJu7NTgtKcGCgmTWKgiZYRMNumneiePNOQHBZ1TAHo/HP1mxjUN3Q27
ULTyAmfyzjuiaZOb/Cs3r9f4qZRZFJBxHrTzOP91f/bGF3Z+DQyiWwSFg9VYPTeC
EQ/MrXQMQaJp2qPvglCAqaSEseqkCbsH85WBE1VO8+h4NxO0vGVLnowVvVHkUfmL
otDW/zeBBnnazAZQ2QurnyqmxDh4Bt2xkFITHNAj2oDGCsKau/NuQ6A8efx51et+
P1yMmjfbrtTSjiNBZ5v5g1iTjc93krzkMnFwzStmir4qeZklW5Ium/gufwE89L59
zEG2OQGVTBVFg+hK8jq6mLyW7UOKmNSRw/dJQe1IODd9PQ2+9PbMix/AXcS7qNjV
VL8oHxoQfb5Fjfwi8HUxmRJAyBAYE7b2299fsRANBg==
=p3Rw
-----END PGP SIGNATURE-----

View File

@ -23,7 +23,7 @@ Name: strongswan
%define strongswan_docdir %{_docdir}/%{name}
%define strongswan_plugins %{_libexecdir}/ipsec/plugins
Version: 4.5.0
Release: 0
Release: 1
License: GPLv2+
Group: Productivity/Networking/Security
Summary: OpenSource IPsec-based VPN Solution
@ -498,6 +498,7 @@ fi
%{strongswan_plugins}/libstrongswan-mysql.so
%if 0%{suse_version} >= 1110
%files sqlite
%defattr(-,root,root)
%dir %{strongswan_plugins}