mirror of
https://github.com/irssi/irssi.git
synced 2026-08-21 09:32:32 +02: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
1 changed files with 6 additions and 2 deletions
|
|
@ -27,6 +27,10 @@
|
||||||
#include "irc-channels.h"
|
#include "irc-channels.h"
|
||||||
#include "nicklist.h"
|
#include "nicklist.h"
|
||||||
|
|
||||||
|
#ifndef HOST_NAME_MAX
|
||||||
|
#define HOST_NAME_MAX 255
|
||||||
|
#endif
|
||||||
|
|
||||||
static char *last_join;
|
static char *last_join;
|
||||||
|
|
||||||
/* last person to join a channel you are on */
|
/* 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;
|
IRC_SERVER_REC *ircserver;
|
||||||
const char *username;
|
const char *username;
|
||||||
char hostname[HOST_NAME_MAX];
|
char hostname[HOST_NAME_MAX + 1];
|
||||||
|
|
||||||
ircserver = IRC_SERVER(server);
|
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)
|
static char *expando_hostname(SERVER_REC *server, void *item, int *free_ret)
|
||||||
{
|
{
|
||||||
IRC_SERVER_REC *ircserver;
|
IRC_SERVER_REC *ircserver;
|
||||||
char hostname[HOST_NAME_MAX];
|
char hostname[HOST_NAME_MAX + 1];
|
||||||
char **list;
|
char **list;
|
||||||
char *hostname_split;
|
char *hostname_split;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue