summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/libgadu/pubdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Gadu-Gadu/src/libgadu/pubdir.c')
-rw-r--r--protocols/Gadu-Gadu/src/libgadu/pubdir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/protocols/Gadu-Gadu/src/libgadu/pubdir.c b/protocols/Gadu-Gadu/src/libgadu/pubdir.c
index f9d656dfe3..c74ff4f309 100644
--- a/protocols/Gadu-Gadu/src/libgadu/pubdir.c
+++ b/protocols/Gadu-Gadu/src/libgadu/pubdir.c
@@ -735,7 +735,7 @@ int gg_token_watch_fd(struct gg_http *h)
gg_debug(GG_DEBUG_MISC, "=> token body \"%s\"\n", h->body);
- if (h->body && (!(url = malloc(strlen(h->body))) || !(tokenid = malloc(strlen(h->body))))) {
+ if (h->body && (!(url = (char*)malloc(strlen(h->body) + 1)) || !(tokenid = (char*)malloc(strlen(h->body) + 1)))) {
gg_debug(GG_DEBUG_MISC, "=> token, not enough memory for results\n");
free(url);
return -1;