From 3cf8394af5f646642df593c8de833441e186af64 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 24 Feb 1999 20:58:47 +0000 Subject: Changed IMFS to use IMFS_NAME_MAX as the maximum length of a basename rather then NAME_MAX. NAME_MAX is 255 and that lets IMFS chew up memory too fast. Perhaps in the future, the places in IMFS that put a maximum length name string on the stack and the jnode structure does not include a maximu length name string can be fixed so this is not a problem. --- c/src/lib/libc/imfs_gtkn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'c/src/lib/libc/imfs_gtkn.c') diff --git a/c/src/lib/libc/imfs_gtkn.c b/c/src/lib/libc/imfs_gtkn.c index 052c67ceba..aa63841725 100644 --- a/c/src/lib/libc/imfs_gtkn.c +++ b/c/src/lib/libc/imfs_gtkn.c @@ -32,11 +32,11 @@ IMFS_token_types IMFS_get_token( * Copy a name into token. (Remember NULL is a token.) */ - while ( !IMFS_is_separator( path[i] ) && (i <= NAME_MAX) ) { + while ( !IMFS_is_separator( path[i] ) && (i <= IMFS_NAME_MAX) ) { token[i] = path[i]; - if (i == NAME_MAX) + if (i == IMFS_NAME_MAX) return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char( token[i] ) ) -- cgit v1.2.3