Skip to content
Snippets Groups Projects
Commit 066cf565 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Fixed NULL dereferencing bug.

Rev: src/language.yacc:1.55
parent 0e1f17e2
No related branches found
No related tags found
No related merge requests found
......@@ -157,7 +157,7 @@
/* This is the grammar definition of Pike. */
#include "global.h"
RCSID("$Id: language.yacc,v 1.54 1998/03/04 16:43:08 grubba Exp $");
RCSID("$Id: language.yacc,v 1.55 1998/04/20 19:27:05 grubba Exp $");
#ifdef HAVE_MEMORY_H
#include <memory.h>
#endif
......@@ -1213,16 +1213,19 @@ low_idents: F_IDENTIFIER
if(throw_value.type == T_STRING)
{
my_yyerror("%s",throw_value.u.string->str);
$$ = mkintnode(0);
}
else if(IS_ZERO(sp-1) && sp[-1].subtype==1)
{
my_yyerror("'%s' undefined.", $1->str);
$$ = mkintnode(0);
}else{
$$ = mkconstantsvaluenode(sp-1);
}
pop_stack();
}else{
my_yyerror("'%s' undefined.", $1->str);
$$ = mkintnode(0);
}
} else {
$$ = mkintnode(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment