Skip to content

Commit

Permalink
samples: net: txtime: Address length was not init
Browse files Browse the repository at this point in the history
The sockaddr address length was not initialized properly
when receiving packets.

Coverity-CID: 232698
Fixes #35159

Signed-off-by: Jukka Rissanen <[email protected]>
  • Loading branch information
jukkar authored and galak committed May 11, 2021
1 parent f602801 commit 7c0ab58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/net/sockets/txtime/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static void rx(struct app_data *data)
{
static uint8_t recv_buf[sizeof(txtime_str)];
struct sockaddr src;
socklen_t addr_len;
socklen_t addr_len = data->peer_addr_len;
ssize_t len = 0;

while (true) {
Expand Down

0 comments on commit 7c0ab58

Please sign in to comment.