Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion port/posix/posix_transport_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ static int posixTransportTcp_Send(int fd, uint16_t* buffer_offset,
return WH_ERROR_BADARGS;
}

send_size = sizeof(uint32_t) + size;
if(*buffer_offset == 0) {
/* Initial write. Copy data to buffer */
/* Prepend packet data with the size in network order */
*packet_len = htonl((uint32_t)size);
memcpy(packet_data, data, size);
send_size = sizeof(uint32_t) + size;
}
int remaining_size = send_size - *buffer_offset;

Expand Down
2 changes: 2 additions & 0 deletions src/wh_server_keystore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,7 @@ static int _AesGcmKeyUnwrap(whServerContext* server, uint16_t serverKeyId,

ret = wc_AesGcmSetKey(aes, serverKey, serverKeySz);
if (ret != 0) {
wc_AesFree(aes);
return ret;
}

Expand Down Expand Up @@ -1171,6 +1172,7 @@ static int _AesGcmDataUnwrap(whServerContext* server, uint16_t serverKeyId,

ret = wc_AesGcmSetKey(aes, serverKey, serverKeySz);
if (ret != 0) {
wc_AesFree(aes);
return ret;
}

Expand Down
Loading