Skip to content

Commit

Permalink
We don't corretly terminate our varargs
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSully committed Mar 24, 2019
1 parent 1dff223 commit 8bcde75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/replication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1819,10 +1819,10 @@ void syncWithMaster(aeEventLoop *el, int fd, void *privdata, int mask) {

/* Send UUID */
if (server.repl_state == REPL_STATE_SEND_UUID) {
char szUUID[37];
char szUUID[37] = {0};
memset(server.master_uuid, 0, UUID_BINARY_LEN);
uuid_unparse((unsigned char*)server.uuid, szUUID);
err = sendSynchronousCommand(SYNC_CMD_WRITE,fd,"REPLCONF","uuid",szUUID);
err = sendSynchronousCommand(SYNC_CMD_WRITE,fd,"REPLCONF","uuid",szUUID,NULL);
if (err) goto write_error;
server.repl_state = REPL_STATE_RECEIVE_UUID;
return;
Expand Down

0 comments on commit 8bcde75

Please sign in to comment.