diff --git a/src/common/outbound.c b/src/common/outbound.c index 8b0432ec..a09fdce4 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -1716,7 +1716,7 @@ exec_data (GIOChannel *source, GIOCondition condition, struct nbexec *s) rest = buf; if (*rest) { s->buffill = len - (rest - buf); /* = strlen(rest) */ - s->linebuf = malloc(s->buffill); + s->linebuf = malloc(s->buffill + 1); memcpy(s->linebuf, rest, s->buffill); *rest = '\0'; len -= s->buffill; /* possibly 0 */ diff --git a/src/common/servlist.c b/src/common/servlist.c index a94c260a..c9d4b6a8 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -27,7 +27,7 @@ #endif #include "xchat.h" -#include +#include #include "cfgfiles.h" #include "fe.h" diff --git a/src/common/text.c b/src/common/text.c index fd5d25e9..9aa1bc85 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -31,7 +31,7 @@ #endif #include "xchat.h" -#include +#include #include "cfgfiles.h" #include "chanopt.h" #include "plugin.h" diff --git a/src/common/util.c b/src/common/util.c index 51222e40..9d9c2cff 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -45,7 +45,7 @@ #include #include "xchat.h" #include "xchatc.h" -#include +#include #include #include "util.h" #include "../../config.h" diff --git a/src/common/xchat.h b/src/common/xchat.h index 91e2d50e..6815cc39 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -1,10 +1,6 @@ #include "../../config.h" -#include -#include -#include -#include -#include +#include #include /* need time_t */ #ifndef XCHAT_H