Fixes for Coverity issues
This commit is contained in:
@ -363,7 +363,7 @@ unsigned char encrypted[80];
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memset(padded_passwd, 0, 80);
|
memset(padded_passwd, 0, 80);
|
||||||
strcpy((char *)padded_passwd, password);
|
strncpy((char *)padded_passwd, password, 80);
|
||||||
padded_len = ((strlen(password) / AES_BLOCK_SIZE) + 1) * AES_BLOCK_SIZE;
|
padded_len = ((strlen(password) / AES_BLOCK_SIZE) + 1) * AES_BLOCK_SIZE;
|
||||||
|
|
||||||
AES_set_encrypt_key(keys->enckey, 8 * MAXSCALE_KEYLEN, &aeskey);
|
AES_set_encrypt_key(keys->enckey, 8 * MAXSCALE_KEYLEN, &aeskey);
|
||||||
|
@ -356,7 +356,13 @@ int rc;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// socket options
|
// socket options
|
||||||
setsockopt(listener->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one));
|
if (setsockopt(listener->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&one, sizeof(one)))
|
||||||
|
{
|
||||||
|
LOGIF(LE, (skygw_log_write(
|
||||||
|
LOGFILE_ERROR,
|
||||||
|
"Unable to set SO_REUSEADDR on maxscale listener."
|
||||||
|
)));
|
||||||
|
}
|
||||||
// set NONBLOCKING mode
|
// set NONBLOCKING mode
|
||||||
setnonblocking(listener->fd);
|
setnonblocking(listener->fd);
|
||||||
// bind address and port
|
// bind address and port
|
||||||
|
Reference in New Issue
Block a user