From 374056ceccf15e8c4628da202338eed2180078b1 Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Tue, 15 Sep 2015 16:18:10 +0200 Subject: [PATCH] Valgrind fixes Valgrind fixes --- server/modules/routing/binlog/blr_file.c | 2 +- server/modules/routing/binlog/blr_slave.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/server/modules/routing/binlog/blr_file.c b/server/modules/routing/binlog/blr_file.c index 2e9514010..ab212b671 100644 --- a/server/modules/routing/binlog/blr_file.c +++ b/server/modules/routing/binlog/blr_file.c @@ -267,7 +267,7 @@ int fd; fsync(fd); close(router->binlog_fd); spinlock_acquire(&router->binlog_lock); - strncpy(router->binlog_name, file, BINLOG_FNAMELEN); + memmove(router->binlog_name, file, BINLOG_FNAMELEN); router->current_pos = lseek(fd, 0L, SEEK_END); if (router->current_pos < 4) { if (router->current_pos == 0) { diff --git a/server/modules/routing/binlog/blr_slave.c b/server/modules/routing/binlog/blr_slave.c index 603354bce..369270c21 100644 --- a/server/modules/routing/binlog/blr_slave.c +++ b/server/modules/routing/binlog/blr_slave.c @@ -3984,7 +3984,6 @@ uint8_t *ptr; } else { *ptr++ = 1; /* warning byte set to 1 */ *ptr++ = 0; - *ptr++ = 0; } /* set the new warning in this slave connection */