Opened 6 years ago

Closed 4 years ago

#1480 closed defect (fixed)

UPnP: IllegalArgumentException while parsing SSDPPacket

Reported by: str4d Owned by: zzz
Priority: minor Milestone: 0.9.28
Component: router/transport Version: 0.9.17
Keywords: UPnP Cc:
Parent Tickets: Sensitive: no


From Google Play:

java.lang.IllegalArgumentException: size <= 0
    at org.cybergarage.http.HTTPHeader.getValue(
    at org.cybergarage.http.HTTPHeader.getValue(
    at org.cybergarage.upnp.ssdp.SSDPPacket.getHost(
    at org.cybergarage.upnp.ssdp.SSDPPacket.getHostInetAddress(

Reports total: 1
Application version:
Android version: 5.0
Device: Nexus 5 (hammerhead)


Change History (4)

comment:1 Changed 6 years ago by zzz

Constructor IAE not documented but clearly wrong and super (BufferedReader?) does document IAE.

There's nothing to catch an IAE or other unchecked exception in the socket thread.

We can add code to catch it but should probably update the upnp lib first, then report upstream if we don't see a fix. Killing the whole thread is bad as this will kill any SSDP reception. But obviously rare… it's some bad SSDP packet, or an empty packet? No, looks like a bogus or missing HTTP Host: header? See SSDPPacket.getHostInetAddress()

comment:2 Changed 6 years ago by zzz

UPnP lib updated to latest in 0.9.18-6. Very unlikely to fix this. We should proceed with a local fix.

comment:3 Changed 5 years ago by str4d

Status: newopen

comment:4 Changed 4 years ago by zzz

Milestone: undecided0.9.28
Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.