aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-22 17:56:50 +0200
committerMattias Andrée <maandree@kth.se>2016-07-22 17:56:50 +0200
commit46d07e4ea1b82606f3fc29024dc9f8eb5c05fa4d (patch)
treee434b26ffc38dc85fe1136d9d1601f4c304dc320 /src
parentFix inequality check (diff)
downloadlibcoopgamma-46d07e4ea1b82606f3fc29024dc9f8eb5c05fa4d.tar.gz
libcoopgamma-46d07e4ea1b82606f3fc29024dc9f8eb5c05fa4d.tar.bz2
libcoopgamma-46d07e4ea1b82606f3fc29024dc9f8eb5c05fa4d.tar.xz
fix bug
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/libcoopgamma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c
index 235864a..924e936 100644
--- a/src/libcoopgamma.c
+++ b/src/libcoopgamma.c
@@ -1611,7 +1611,7 @@ int libcoopgamma_synchronise(libcoopgamma_context_t* restrict ctx,
ssize_t n__; \
char* msg__; \
snprintf(NULL, (size_t)0, format "%zn", __VA_ARGS__, &n__); \
- msg__ = malloc((size_t)n__ + (payload_size)); \
+ msg__ = malloc((size_t)n__ + (payload_size) + (size_t)1); \
if (msg__ == NULL) \
goto fail; \
sprintf(msg__, format, __VA_ARGS__); \