Update UDP_broadcast.c
problem resolved
This commit is contained in:
@@ -97,7 +97,7 @@ static void format_reply(owner_details_t *owner){
|
|||||||
char mac_addr_str[18];
|
char mac_addr_str[18];
|
||||||
char* reply_buf = NULL;
|
char* reply_buf = NULL;
|
||||||
if (owner != 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);
|
reply_buf = (char*)malloc(reply_len);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user