mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-06 09:17:25 +00:00
Work around potential state machine bogon with FILL. This needs
to be scrapped, ultimately, and it will be.
This commit is contained in:
parent
3f1d66701a
commit
606b60ca2f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28389
@ -4,7 +4,7 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: attr.c,v 1.8.2.8 1997/03/28 23:07:09 jkh Exp $
|
||||
* $Id: attr.c,v 1.17 1997/04/02 12:07:21 jkh Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -60,7 +60,7 @@ attr_parse(Attribs *attr, FILE *fp)
|
||||
{
|
||||
char hold_n[MAX_NAME+1];
|
||||
char hold_v[MAX_VALUE+1];
|
||||
char buf[BUFSIZ];
|
||||
char buf[BUFSIZ * 4];
|
||||
int bp, n, v, max;
|
||||
enum { LOOK, COMMENT, NAME, VALUE, MVALUE, COMMIT, FILL, STOP } state;
|
||||
int num_attribs;
|
||||
@ -98,7 +98,7 @@ attr_parse(Attribs *attr, FILE *fp)
|
||||
state = COMMENT;
|
||||
continue;
|
||||
}
|
||||
else if (isalpha(ch) || ch == '_') {
|
||||
else if (isalnum(ch) || ch == '_') {
|
||||
if (n >= MAX_NAME) {
|
||||
msgDebug("Attribute name overflow at character %d, ignoring entry..\n", n);
|
||||
n = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user