This is an automated email from the ASF dual-hosted git repository.

wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d155f57 Fix domain naming service host name buffer length (#2179)
5d155f57 is described below

commit 5d155f57f3f72bea04618e549efa0d9778cc6f18
Author: DongSheng He <[email protected]>
AuthorDate: Tue Mar 28 09:57:03 2023 +0800

    Fix domain naming service host name buffer length (#2179)
    
    * extend domain-naming-service hostname length to 256
    
    * extend domain-naming-service hostname length to 256
---
 src/brpc/policy/domain_naming_service.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/brpc/policy/domain_naming_service.cpp 
b/src/brpc/policy/domain_naming_service.cpp
index 594f0870..d93d7990 100644
--- a/src/brpc/policy/domain_naming_service.cpp
+++ b/src/brpc/policy/domain_naming_service.cpp
@@ -42,7 +42,7 @@ int DomainNamingService::GetServers(const char* dns_name,
     }
 
     // Should be enough to hold host name
-    char buf[128];
+    char buf[256];
     size_t i = 0;
     for (; i < sizeof(buf) - 1 && dns_name[i] != '\0'
              && dns_name[i] != ':' && dns_name[i] != '/'; ++i) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to