Fixed bogus assert about name lengths (bug 4486, r=fyren).

This commit is contained in:
David Anderson 2010-07-02 18:12:31 -07:00
parent f439cad46c
commit 7054b92a14
2 changed files with 2 additions and 2 deletions

View File

@ -5437,7 +5437,7 @@ static constvalue *insert_constval(constvalue *prev,constvalue *next,const char
error(123); /* insufficient memory (fatal error) */ error(123); /* insufficient memory (fatal error) */
memset(cur,0,sizeof(constvalue)); memset(cur,0,sizeof(constvalue));
if (name!=NULL) { if (name!=NULL) {
assert(strlen(name)<sNAMEMAX); assert(strlen(name)<=sNAMEMAX);
strcpy(cur->name,name); strcpy(cur->name,name);
} /* if */ } /* if */
cur->value=val; cur->value=val;

View File

@ -237,7 +237,7 @@ static void check_empty(const unsigned char *lptr)
static void doinclude(int silent) static void doinclude(int silent)
{ {
char name[_MAX_PATH]; char name[_MAX_PATH];
char symname[sNAMEMAX]; char symname[sNAMEMAX+1];
char *ptr; char *ptr;
char c; char c;
int i, result; int i, result;