Re: uninitialised variable crashes in bgpd config parser

2017-10-19 Thread Sebastian Benoit
ok benno@

Jonathan Gray(j...@jsg.id.au) on 2017.10.19 16:34:35 +1100:
> Index: parse.y
> ===
> RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
> retrieving revision 1.315
> diff -u -p -r1.315 parse.y
> --- parse.y   21 Aug 2017 14:41:22 -  1.315
> +++ parse.y   19 Oct 2017 05:32:03 -
> @@ -3181,7 +3181,7 @@ parseextcommunity(struct filter_extcommu
>   switch (type) {
>   case -1:
>   if ((p = strchr(s, ':')) == NULL) {
> - yyerror("Bad ext-community %s is %s", s, errstr);
> + yyerror("Bad ext-community %s", s);
>   return (-1);
>   }
>   *p++ = '\0';
> @@ -3239,7 +3239,7 @@ parseextcommunity(struct filter_extcommu
>   else if (strcmp(s, "not-found") == 0)
>   c->data.ext_opaq = EXT_COMMUNITY_OVS_NOTFOUND;
>   else {
> - yyerror("Bad ext-community %s is %s", s, errstr);
> + yyerror("Bad ext-community %s", s);
>   return (-1);
>   }
>   break;
> 



Re: uninitialised variable crashes in bgpd config parser

2017-10-19 Thread Claudio Jeker
OK claudio@

On Thu, Oct 19, 2017 at 04:34:35PM +1100, Jonathan Gray wrote:
> Index: parse.y
> ===
> RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
> retrieving revision 1.315
> diff -u -p -r1.315 parse.y
> --- parse.y   21 Aug 2017 14:41:22 -  1.315
> +++ parse.y   19 Oct 2017 05:32:03 -
> @@ -3181,7 +3181,7 @@ parseextcommunity(struct filter_extcommu
>   switch (type) {
>   case -1:
>   if ((p = strchr(s, ':')) == NULL) {
> - yyerror("Bad ext-community %s is %s", s, errstr);
> + yyerror("Bad ext-community %s", s);
>   return (-1);
>   }
>   *p++ = '\0';
> @@ -3239,7 +3239,7 @@ parseextcommunity(struct filter_extcommu
>   else if (strcmp(s, "not-found") == 0)
>   c->data.ext_opaq = EXT_COMMUNITY_OVS_NOTFOUND;
>   else {
> - yyerror("Bad ext-community %s is %s", s, errstr);
> + yyerror("Bad ext-community %s", s);
>   return (-1);
>   }
>   break;
> 

-- 
:wq Claudio



uninitialised variable crashes in bgpd config parser

2017-10-18 Thread Jonathan Gray
Index: parse.y
===
RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
retrieving revision 1.315
diff -u -p -r1.315 parse.y
--- parse.y 21 Aug 2017 14:41:22 -  1.315
+++ parse.y 19 Oct 2017 05:32:03 -
@@ -3181,7 +3181,7 @@ parseextcommunity(struct filter_extcommu
switch (type) {
case -1:
if ((p = strchr(s, ':')) == NULL) {
-   yyerror("Bad ext-community %s is %s", s, errstr);
+   yyerror("Bad ext-community %s", s);
return (-1);
}
*p++ = '\0';
@@ -3239,7 +3239,7 @@ parseextcommunity(struct filter_extcommu
else if (strcmp(s, "not-found") == 0)
c->data.ext_opaq = EXT_COMMUNITY_OVS_NOTFOUND;
else {
-   yyerror("Bad ext-community %s is %s", s, errstr);
+   yyerror("Bad ext-community %s", s);
return (-1);
}
break;