aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-08-24 17:05:39 +0200
committerMattias Andrée <maandree@operamail.com>2015-08-24 17:05:39 +0200
commitd23604a5088154a0f3c253faf387cefc3b15fe31 (patch)
tree63b2e2f82b0d6760b11dd50b662af535f35ec07d
parentmds-registry: fix memory free upon error bug (diff)
downloadmds-d23604a5088154a0f3c253faf387cefc3b15fe31.tar.gz
mds-d23604a5088154a0f3c253faf387cefc3b15fe31.tar.bz2
mds-d23604a5088154a0f3c253faf387cefc3b15fe31.tar.xz
mds-registry: fix buffer overflow
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/mds-registry/slave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mds-registry/slave.c b/src/mds-registry/slave.c
index 8799cf4..b7f0456 100644
--- a/src/mds-registry/slave.c
+++ b/src/mds-registry/slave.c
@@ -40,7 +40,7 @@
*/
static int slave_notify_client(slave_t* slave)
{
- char buf[sizeof("To: %s\nIn response to: %s\nMessage ID: %" PRIu32 "\n\n") / sizeof(char) + 40];
+ char buf[sizeof("To: %s\nIn response to: %s\nMessage ID: %" PRIu32 "\n\n") / sizeof(char) + 41];
size_t ptr = 0, sent, left;
/* Construct message headers. */