mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
chan_unistim: Fix memcpy in get_to_address
A code block only enabled when HAVE_PKTINFO is not defined (FreeBSD) was using a pointer to a pointer as the destination of a memcpy and a '&' instead of '*' in the sizeof. ASTERISK-26138 #close Change-Id: Id4927ff256c0e470bdf7bcfc025146a2f656e708
This commit is contained in:
@@ -1021,7 +1021,7 @@ static int get_to_address(int fd, struct sockaddr_in *toAddr)
|
||||
memcpy(&toAddr->sin_addr, &ip_msg.address, sizeof(struct in_addr));
|
||||
return err;
|
||||
#else
|
||||
memcpy(&toAddr, &public_ip, sizeof(&toAddr));
|
||||
memcpy(toAddr, &public_ip, sizeof(*toAddr));
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user