smtp_connect: use defined buffer length for hostname
authorSteve Holme <steve_holme@hotmail.com>
Sun, 25 Sep 2011 22:01:09 +0000 (00:01 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 25 Sep 2011 22:01:09 +0000 (00:01 +0200)
lib/smtp.c

index bb29a83..bf48e28 100644 (file)
@@ -1100,7 +1100,7 @@ static CURLcode smtp_connect(struct connectdata *conn,
   struct pingpong *pp = &smtpc->pp;
   const char *path = conn->data->state.path;
   int len;
-  char localhost[1024 + 1];
+  char localhost[HOSTNAME_MAX + 1];
 
   *done = FALSE; /* default to not done yet */