ssb: Address a -fanalyze issue. #114
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled
This commit is contained in:
parent
bb7b04013f
commit
edb1980387
@ -579,6 +579,11 @@ static void _tf_ssb_connection_box_stream_send(tf_ssb_connection_t* connection,
|
|||||||
{
|
{
|
||||||
size_t send_size = size - offset > k_send_max ? k_send_max : size - offset;
|
size_t send_size = size - offset > k_send_max ? k_send_max : size - offset;
|
||||||
uint8_t* message_enc = tf_malloc(send_size + 34);
|
uint8_t* message_enc = tf_malloc(send_size + 34);
|
||||||
|
if (!message_enc)
|
||||||
|
{
|
||||||
|
tf_ssb_connection_close(connection, "out of memory");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t nonce1[crypto_secretbox_NONCEBYTES];
|
uint8_t nonce1[crypto_secretbox_NONCEBYTES];
|
||||||
memcpy(nonce1, connection->send_nonce, sizeof(nonce1));
|
memcpy(nonce1, connection->send_nonce, sizeof(nonce1));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user