From ba60970485e06d70ed4b973a1386e0601c49a86d Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Mon, 4 Jun 2012 09:56:33 +0530 Subject: libglusterfs: valid_host_name() fix Fix valid_host_name() to allow single character hostnames. Change-Id: I72527ecedec52fa47336d95b0586eb18dac6273d BUG: 827403 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.com/3508 Reviewed-by: Amar Tumballi Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/common-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index c9c396762..280cf2189 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -1644,7 +1644,7 @@ valid_host_name (char *address, int length) char *temp_str = NULL; char *save_ptr = NULL; - if ((length > _POSIX_HOST_NAME_MAX) || (length == 1)) { + if ((length > _POSIX_HOST_NAME_MAX) || (length < 1)) { ret = 0; goto out; } -- cgit