1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00

Set HOST_NAME_MAX to 255, if it's undefined.

Thanks to Jilles and dx.

Fixes #309
This commit is contained in:
Alexander Færøy 2015-10-02 19:51:54 +02:00
parent a66bb95d0e
commit da3f2f0d01
No known key found for this signature in database
GPG Key ID: E15081D5D3C3DB53

View File

@ -27,6 +27,10 @@
#include "irc-channels.h"
#include "nicklist.h"
#ifndef HOST_NAME_MAX
#define HOST_NAME_MAX 255
#endif
static char *last_join;
/* last person to join a channel you are on */
@ -56,7 +60,7 @@ static char *expando_userhost(SERVER_REC *server, void *item, int *free_ret)
{
IRC_SERVER_REC *ircserver;
const char *username;
char hostname[HOST_NAME_MAX];
char hostname[HOST_NAME_MAX + 1];
ircserver = IRC_SERVER(server);
@ -80,7 +84,7 @@ static char *expando_userhost(SERVER_REC *server, void *item, int *free_ret)
static char *expando_hostname(SERVER_REC *server, void *item, int *free_ret)
{
IRC_SERVER_REC *ircserver;
char hostname[HOST_NAME_MAX];
char hostname[HOST_NAME_MAX + 1];
char **list;
char *hostname_split;