fixed two possible NULL dereferences

This commit is contained in:
Дмитрий Левин 2002-07-20 10:23:28 +00:00
parent 346caccff0
commit 3b7a25ec52

View File

@ -2425,7 +2425,7 @@ static int parseExpression(sprintfToken token, char * str,
&token->u.cond.numIfTokens, &end, PARSER_IN_EXPR, errmsg))
return 1;
if (!*end) {
if (!end || !*end) {
/*@-observertrans -readonlytrans@*/
if (errmsg) *errmsg = _("} expected in expression");
/*@=observertrans =readonlytrans@*/
@ -2467,7 +2467,7 @@ static int parseExpression(sprintfToken token, char * str,
&token->u.cond.numElseTokens, &end, PARSER_IN_EXPR,
errmsg))
return 1;
if (!*end) {
if (!end || !*end) {
/*@-observertrans -readonlytrans@*/
if (errmsg) *errmsg = _("} expected in expression");
/*@=observertrans =readonlytrans@*/