mirror of
https://github.com/irssi/irssi.git
synced 2024-10-13 05:03:45 -04:00
Set HOST_NAME_MAX to 255, if it's undefined.
Thanks to Jilles and dx. Fixes #309
This commit is contained in:
parent
a66bb95d0e
commit
da3f2f0d01
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user