diff options
author | Milan Jurik <Milan.Jurik@Sun.COM> | 2010-02-23 08:47:36 +0000 |
---|---|---|
committer | Milan Jurik <Milan.Jurik@Sun.COM> | 2010-02-23 08:47:36 +0000 |
commit | c9a5bc8f8ef20fd68ff0b46331bbaf26e1415abb (patch) | |
tree | 3c0fc31e655f0ddd3ad134dfaa48aa6c0815c6e4 | |
parent | 12d52277aec53c52509f0f071a3b59a40934a802 (diff) | |
download | illumos-gate-c9a5bc8f8ef20fd68ff0b46331bbaf26e1415abb.tar.gz |
6753228 Array overrun in nscd initialization
-rw-r--r-- | usr/src/cmd/nscd/cache.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr/src/cmd/nscd/cache.h b/usr/src/cmd/nscd/cache.h index 249acf1bd7..752c94fd37 100644 --- a/usr/src/cmd/nscd/cache.h +++ b/usr/src/cmd/nscd/cache.h @@ -19,15 +19,13 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _NSCD_H #define _NSCD_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This is a private header file. Applications should not directly include * this file. @@ -83,7 +81,7 @@ extern "C" { /* * other internal constants */ -#define _NSC_MAX_DB 2 +#define _NSC_MAX_DB 3 #define _NSC_PUBLIC_ACCESS -1 #define _NSC_FILE_CHECK_TIME 0 /* check always for backwards compat */ @@ -290,7 +288,7 @@ typedef struct nsc_ctx { off_t file_size; /* file size at last check */ ino_t file_ino; /* file inode at last check */ const char *file_name; /* filename for check_files */ - int db_count; /* number of caches */ + int db_count; /* number of caches, max _NSC_MAX_DB */ nsc_db_t *nsc_db[_NSC_MAX_DB]; /* caches */ sema_t throttle_sema; /* throttle lookups */ sema_t revalidate_sema; /* revalidation threads */ |