forked from pool/strongswan
This commit is contained in:
parent
18ed32232d
commit
47413c56c2
42
strongswan-4.x.x-getline.patch
Normal file
42
strongswan-4.x.x-getline.patch
Normal file
@ -0,0 +1,42 @@
|
||||
--- src/libfreeswan/optionsfrom.c
|
||||
+++ src/libfreeswan/optionsfrom.c
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
static const char *dowork(const char *, int *, char ***, int);
|
||||
static const char *getanarg(FILE *, struct work *, char **);
|
||||
-static char *getline(FILE *, char *, size_t);
|
||||
+static char *my_getline(FILE *, char *, size_t);
|
||||
|
||||
/*
|
||||
- optionsfrom - add some options, taken from a file, to argc/argv
|
||||
@@ -149,7 +149,7 @@
|
||||
char *endp;
|
||||
|
||||
while (w->pending == NULL) { /* no pending line */
|
||||
- if ((w->line = getline(f, w->buf, sizeof(w->buf))) == NULL)
|
||||
+ if ((w->line = my_getline(f, w->buf, sizeof(w->buf))) == NULL)
|
||||
return "error in line read"; /* caller checks EOF */
|
||||
if (w->line[0] != '#' &&
|
||||
*(w->line + strspn(w->line, " \t")) != '\0')
|
||||
@@ -171,7 +171,7 @@
|
||||
if (*linep == NULL)
|
||||
return "out of memory for new line";
|
||||
strcpy(*linep, p);
|
||||
- } else /* getline already malloced it */
|
||||
+ } else /* my_getline already malloced it */
|
||||
*linep = p;
|
||||
return NULL;
|
||||
}
|
||||
@@ -203,10 +203,10 @@
|
||||
}
|
||||
|
||||
/*
|
||||
- - getline - read a line from the file, trim newline off
|
||||
+ - my_getline - read a line from the file, trim newline off
|
||||
*/
|
||||
static char * /* pointer to line, NULL for eof/error */
|
||||
-getline(f, buf, bufsize)
|
||||
+my_getline(f, buf, bufsize)
|
||||
FILE *f;
|
||||
char *buf; /* buffer to use, if convenient */
|
||||
size_t bufsize; /* size of buf */
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 8 00:21:13 CEST 2009 - ro@suse.de
|
||||
|
||||
- rename getline to my_getline to avoid collision with function
|
||||
from glibc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 2 09:56:16 CEST 2009 - mt@suse.de
|
||||
|
||||
|
@ -22,7 +22,7 @@ Name: strongswan
|
||||
%define upstream_version 4.2.14
|
||||
%define strongswan_docdir %{_docdir}/%{name}
|
||||
Version: 4.2.14
|
||||
Release: 2
|
||||
Release: 3
|
||||
License: GPL v2 or later
|
||||
Group: Productivity/Networking/Security
|
||||
Summary: StrongSwan -- OpenSource IPsec-based VPN Solution
|
||||
@ -41,6 +41,7 @@ Patch1: %{name}_modprobe_syslog.dif
|
||||
Patch2: %{name}_update-dns-server.dif
|
||||
Patch3: %{name}-4.x.x_invalid_ike_state.patch
|
||||
Patch4: %{name}-4.x.x._swapped_ts_check.patch
|
||||
Patch5: strongswan-4.x.x-getline.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: bison flex gmp-devel gperf pkg-config
|
||||
%if 0%{?suse_version} >= 1030
|
||||
@ -139,6 +140,7 @@ Authors:
|
||||
%patch2 -p0
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5
|
||||
sed -e 's|@libexecdir@|%_libexecdir|g' \
|
||||
< $RPM_SOURCE_DIR/strongswan.init.in \
|
||||
> strongswan.init
|
||||
@ -271,6 +273,9 @@ fi
|
||||
%{_mandir}/man8/starter.8*
|
||||
|
||||
%changelog
|
||||
* Mon Jun 08 2009 ro@suse.de
|
||||
- rename getline to my_getline to avoid collision with function
|
||||
from glibc
|
||||
* Tue Jun 02 2009 mt@suse.de
|
||||
- Applied fix for a Denial-of-Service vulnerability where receiving
|
||||
a malformed IKE_SA_INIT request leaves an incomplete state which
|
||||
|
Loading…
Reference in New Issue
Block a user