Fixes for Coverity issues
This commit is contained in:
parent
c2655e048c
commit
0e6fa09d7e
@ -363,7 +363,7 @@ unsigned char encrypted[80];
|
||||
return NULL;
|
||||
|
||||
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;
|
||||
|
||||
AES_set_encrypt_key(keys->enckey, 8 * MAXSCALE_KEYLEN, &aeskey);
|
||||
|
@ -356,7 +356,13 @@ int rc;
|
||||
}
|
||||
|
||||
// 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
|
||||
setnonblocking(listener->fd);
|
||||
// bind address and port
|
||||
|
Loading…
x
Reference in New Issue
Block a user