Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2959 closed defect (fixed)

Segmentation fault in mythbackend: GetIPAddressList()

Reported by: anonymous Owned by: Nigel
Priority: major Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords: upnp mythbackend
Cc: Ticket locked: no


When running the svn (revision 12584) version of mythbackend I get a segmentation fault on startup.

GDB narrows it down to

... in GetIPAddressList (sStrList=@0x836a60) at upnputil.cpp:70
70              if (ifa->ifa_addr->sa_family != AF_INET)
(gdb) print ifa->ifa_addr
$2 = (sockaddr *) 0x0
(gdb) print *ifa
$3 = {ifa_next = 0x839190, ifa_name = 0x83917c "tun0",
  ifa_flags = 69841, ifa_addr = 0x0, ifa_netmask = 0x0,
  ifa_ifu = {ifu_broadaddr = 0x0, ifu_dstaddr = 0x0},
  ifa_data = 0x839e28}

The ifa_addr pointer is null for the OpenVPN tun0 network adapter on my mythtv server.

Looks like the code needs a test for null ifa_addr.

My workaround was to run mythbackend with --noupnp.

Change History (3)

comment:1 Changed 14 years ago by Nigel

Owner: changed from Isaac Richards to Nigel
Status: newassigned

Oops. Sorry about that. I thought the 7 different interfaces on my Mac would be enough of a test!

comment:2 Changed 14 years ago by Nigel

Resolution: fixed
Status: assignedclosed

(In [12588]) Apparently, interfaces can have a NULL ifa_addr? Closes #2959

comment:3 Changed 14 years ago by anonymous

That fixed it! Thank you.

Note: See TracTickets for help on using tickets.