Skip to content

Commit

Permalink
stun: prevent buffer overflow on error
Browse files Browse the repository at this point in the history
(cherry picked from commit dca22b0)
  • Loading branch information
razvancrainea committed Oct 31, 2018
1 parent 2396ab5 commit 60c1a02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/stun/stun.c
Expand Up @@ -318,8 +318,8 @@ int receive(int sockfd, struct receive_info *ri, str *msg, void* param)
else if(sockfd == sockfd4)
sprintf(s, "%i %s %d", sockfd4, alternate_ip, port2);
else{
sprintf(s, "%i unknown %s %d", sockfd, alternate_ip, port2);
LM_DBG("Received: on [%s] from [%s %i]; drop msg\n", s, inet_ntoa(client->sin_addr),
LM_DBG("Received: on [%i unknown %s %d] from [%s %i]; drop msg\n",
sockfd, alternate_ip, port2, inet_ntoa(client->sin_addr),
ntohs(client->sin_port));
return -1;
}
Expand Down

0 comments on commit 60c1a02

Please sign in to comment.