Update UDP_broadcast.c

problem resolved
This commit is contained in:
joran2738
2023-11-06 23:59:21 +01:00
parent 566bdb00ed
commit 00678a9382

View File

@@ -97,7 +97,7 @@ static void format_reply(owner_details_t *owner){
char mac_addr_str[18];
char* reply_buf = NULL;
if (owner != NULL) {
reply_len = 20 + strlen(mac_addr_str) + strlen(owner->surname) + strlen(owner->name);
reply_len = 20 + sizeof(mac_addr_str) + sizeof(owner->surname) + sizeof(owner->name);
reply_buf = (char*)malloc(reply_len);