--- ray/src/common/readobj.c 2003/06/20 00:25:49 2.15 +++ ray/src/common/readobj.c 2010/03/30 12:42:33 2.20 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: readobj.c,v 2.15 2003/06/20 00:25:49 greg Exp $"; +static const char RCSid[] = "$Id: readobj.c,v 2.20 2010/03/30 12:42:33 greg Exp $"; #endif /* * readobj.c - routines for reading in object descriptions. @@ -10,11 +10,12 @@ static const char RCSid[] = "$Id: readobj.c,v 2.15 200 #include "copyright.h" #include +#include #include -#include -#include "standard.h" #include "platform.h" +#include "rtprocess.h" +#include "standard.h" #include "object.h" #include "otypes.h" @@ -29,7 +30,7 @@ char *inpspec; { OBJECT lastobj; FILE *infp; - char buf[1024]; + char buf[2048]; register int c; lastobj = nobjects; @@ -87,6 +88,11 @@ FILE *fp; /* get modifier */ strcpy(sbuf, "EOF"); fgetword(sbuf, MAXSTR, fp); + if (strchr(sbuf, '\t')) { + sprintf(errmsg, "(%s): illegal tab in modifier \"%s\"", + name, sbuf); + error(USER, errmsg); + } if (!strcmp(sbuf, VOIDID)) objp->omod = OVOID; else if (!strcmp(sbuf, ALIASMOD)) @@ -105,6 +111,11 @@ FILE *fp; /* get identifier */ sbuf[0] = '\0'; fgetword(sbuf, MAXSTR, fp); + if (strchr(sbuf, '\t')) { + sprintf(errmsg, "(%s): illegal tab in identifier \"%s\"", + name, sbuf); + error(USER, errmsg); + } objp->oname = savqstr(sbuf); /* get arguments */ if (objp->otype == MOD_ALIAS) { @@ -181,7 +192,7 @@ int firstobj, nobjs; free_os(o); /* free client memory */ freeqstr(o->oname); freefargs(&o->oargs); - bzero((void *)o, sizeof(OBJREC)); + memset((void *)o, '\0', sizeof(OBJREC)); } clearobjndx(); /* free objects off end */