Coverity CID 862: Avoid NULL deref.

This commit is contained in:
christos 2006-03-18 22:37:16 +00:00
parent 73a77c6016
commit a1f97364cb
1 changed files with 1 additions and 1 deletions

2
dist/nawk/tran.c vendored
View File

@ -218,7 +218,7 @@ Cell *setsymtab(const char *n, const char *s, Awkfloat f, unsigned t, Array *tp)
p = (Cell *) malloc(sizeof(Cell));
if (p == NULL)
FATAL("out of space for symbol table at %s", n);
p->nval = tostring(n);
p->nval = n ? tostring(n) : tostring("");
p->sval = s ? tostring(s) : tostring("");
p->fval = f;
p->tval = t;