From c9567f2f221cd19f455cff207feec9efe2171632 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 10 Nov 2006 13:46:19 +0000 Subject: r19652: Trying to track down which caller tries to store a 0 length domain name in the affinity cache (which happens all the time here). Guenther (This used to be commit 45d6d300767d5b99aff332bdfb0a8f464fd103e0) --- source3/libsmb/namequery.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/libsmb/namequery.c') diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 44932066b9..555d88fdc8 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -59,6 +59,11 @@ BOOL saf_store( const char *domain, const char *servername ) DEBUG(2,("saf_store: Refusing to store empty domain or servername!\n")); return False; } + + if ( (strlen(domain) == 0) || (strlen(servername) == 0) ) { + DEBUG(0,("saf_store: refusing to store 0 length domain or servername!\n")); + return False; + } if ( !gencache_init() ) return False; @@ -111,7 +116,7 @@ char *saf_fetch( const char *domain ) BOOL ret = False; char *key = NULL; - if ( !domain ) { + if ( !domain || strlen(domain) == 0) { DEBUG(2,("saf_fetch: Empty domain name!\n")); return NULL; } -- cgit