From 831a40494d44045c0caaf8085ab1d35c0da23140 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 May 2009 21:33:43 -0700 Subject: Further robustify nscd database lookup. We can compute an absolute maximum for the number of elements which can fit into the currently mapped database. Stop after that many iterations. --- nscd/nscd-client.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'nscd/nscd-client.h') diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index f66a658d2a..81ca3d56b9 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -44,9 +44,14 @@ /* Path for the configuration file. */ #define _PATH_NSCDCONF "/etc/nscd.conf" -/* Maximu allowed length for the key. */ +/* Maximum allowed length for the key. */ #define MAXKEYLEN 1024 +/* Maximum alignment requirement we will encounter. */ +#define BLOCK_ALIGN_LOG 3 +#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG) +#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1) + /* Available services. */ typedef enum -- cgit v1.2.3