From d3f1007400735812c88353ed6b0a49d9d4d2c7b2 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. BUG: 827403 Change-Id: Ie8df0114cee55b0472b83c077b8ac4fc952f5acd Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.com/3516 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur --- libglusterfs/src/common-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 7e7eb461409..3e6543be75c 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -1590,7 +1590,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