Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2
novell-ipsec-tools
novell-ipsec-tools_plugins-cfparse.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File novell-ipsec-tools_plugins-cfparse.patch of Package novell-ipsec-tools
Index: ipsec-tools-0.7.1/src/racoon/cfparse.y =================================================================== --- ipsec-tools-0.7.1.orig/src/racoon/cfparse.y +++ ipsec-tools-0.7.1/src/racoon/cfparse.y @@ -1018,12 +1018,16 @@ authgroup grouplist = racoon_realloc(icc->grouplist, sizeof(char**)*(icc->groupcount+1)); - if (grouplist == NULL) + if (grouplist == NULL) { yyerror("unable to allocate auth group list"); + return -1; + } groupname = racoon_malloc($1->l+1); - if (groupname == NULL) + if (groupname == NULL) { yyerror("unable to allocate auth group name"); + return -1; + } memcpy(groupname,$1->v,$1->l); groupname[$1->l]=0; @@ -1051,8 +1055,10 @@ splitdns if (!icc->splitdns_len) { icc->splitdns_list = racoon_malloc($1->l); - if(icc->splitdns_list == NULL) + if(icc->splitdns_list == NULL) { yyerror("error allocating splitdns list buffer"); + return -1; + } memcpy(icc->splitdns_list,$1->v,$1->l); icc->splitdns_len = $1->l; } @@ -1060,8 +1066,10 @@ splitdns { int len = icc->splitdns_len + $1->l + 1; icc->splitdns_list = racoon_realloc(icc->splitdns_list,len); - if(icc->splitdns_list == NULL) + if(icc->splitdns_list == NULL) { yyerror("error allocating splitdns list buffer"); + return -1; + } icc->splitdns_list[icc->splitdns_len] = ','; memcpy(icc->splitdns_list + icc->splitdns_len + 1, $1->v, $1->l); icc->splitdns_len = len; @@ -1185,7 +1193,8 @@ sainfo_statement cur_sainfo->iddst, cur_sainfo->id_i, cur_sainfo->remoteid); - if (check && (!check->idsrc && !cur_sainfo->idsrc)) { + if (check && ((check->idsrc != SAINFO_ANONYMOUS) && + (cur_sainfo->idsrc != SAINFO_ANONYMOUS))) { yyerror("duplicated sainfo: %s", sainfo2str(cur_sainfo)); return -1; @@ -1197,18 +1206,18 @@ sainfo_statement sainfo_name : ANONYMOUS { - cur_sainfo->idsrc = NULL; - cur_sainfo->iddst = NULL; + cur_sainfo->idsrc = SAINFO_ANONYMOUS; + cur_sainfo->iddst = SAINFO_ANONYMOUS; } | ANONYMOUS sainfo_id { - cur_sainfo->idsrc = NULL; + cur_sainfo->idsrc = SAINFO_ANONYMOUS; cur_sainfo->iddst = $2; } | sainfo_id ANONYMOUS { cur_sainfo->idsrc = $1; - cur_sainfo->iddst = NULL; + cur_sainfo->iddst = SAINFO_ANONYMOUS; } | sainfo_id sainfo_id { Index: ipsec-tools-0.7.1/src/racoon/sainfo.h =================================================================== --- ipsec-tools-0.7.1.orig/src/racoon/sainfo.h +++ ipsec-tools-0.7.1/src/racoon/sainfo.h @@ -36,6 +36,8 @@ #include <sys/queue.h> +#define SAINFO_ANONYMOUS ((void *)NULL) + /* SA info */ struct sainfo { vchar_t *idsrc;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor