Fix -Werror=format-truncation= warnings in blr_slave.c

The errors were caused by the fact that the server name
MAX_SERVER_NAME_LEN is 1024 bytes long whereas the buffer was 251 bytes.
This commit is contained in:
Markus Mäkelä
2018-03-07 10:47:46 +02:00
parent 69811d9b19
commit f54bbdf73b

View File

@ -1480,7 +1480,7 @@ static int
blr_slave_send_slave_status(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave)
{
GWBUF *pkt;
char column[251] = "";
char column[MAX_SERVER_NAME_LEN + 1] = "";
uint8_t *ptr;
int len, actual_len, col_len, seqno, ncols, i;
char *dyn_column = NULL;