[vlc-commits] smb2: use INET_ADDRSTRLEN directly

Thomas Guillem git at videolan.org
Mon Mar 15 10:05:13 UTC 2021


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar  2 15:43:09 2021 +0100| [12492c1142497b87c492718f405f6a14af3f51ea] | committer: Thomas Guillem

smb2: use INET_ADDRSTRLEN directly

(cherry picked from commit c26c7de515f5e0622101d26cf6faf59daab8c66f)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=12492c1142497b87c492718f405f6a14af3f51ea
---

 modules/access/smb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/smb2.c b/modules/access/smb2.c
index b2747f172e..ada493f44f 100644
--- a/modules/access/smb2.c
+++ b/modules/access/smb2.c
@@ -613,7 +613,7 @@ vlc_smb2_resolve(stream_t *access, const char *host, unsigned port)
     uint32_t ip4_addr;
     if (netbios_ns_resolve(ns, host, NETBIOS_FILESERVER, &ip4_addr) == 0)
     {
-        char ip[] = "xxx.xxx.xxx.xxx";
+        char ip[INET_ADDRSTRLEN];
         if (inet_ntop(AF_INET, &ip4_addr, ip, sizeof(ip)))
             out_host = strdup(ip);
     }



More information about the vlc-commits mailing list