dect
/
dectmon
Archived
13
0
Fork 0

parser: fix minor bugs

- use-after-free in cluster resolution

- missing parameter propagation in MNSS parameter parsing

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2010-12-03 01:14:27 +01:00
parent 642e927e21
commit 979a156671
1 changed files with 7 additions and 4 deletions

View File

@ -271,17 +271,17 @@ cluster : STRING
struct dect_handle_priv *priv;
priv = dect_handle_get_by_name($1);
free($1);
if (priv == NULL) {
char buf[256];
snprintf(buf, sizeof(buf), "cluster '%s' does not exist\n", $1);
free($1);
yyerror(&@1, scanner, state, buf);
YYABORT;
} else
} else {
free($1);
$$ = priv->dh;
}
}
;
@ -408,6 +408,9 @@ mnss_param_alloc :
;
mnss_params : mnss_param
{
$$ = $<mnss_param>-1;
}
| mnss_params ',' mnss_param
;