Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
capmt: check negative value for tvh_socket()
  • Loading branch information
perexg committed Oct 3, 2014
1 parent be55658 commit 12be763
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/descrambler/capmt.c
Expand Up @@ -1354,6 +1354,10 @@ static int
capmt_create_udp_socket(capmt_t *capmt, int *socket, int port)
{
*socket = tvh_socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (*socket < 0) {
tvherror("capmt", "%s: failed to create UDP socket", capmt_name(capmt));
return 0;
}

struct sockaddr_in serv_addr;
serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
Expand Down

0 comments on commit 12be763

Please sign in to comment.