A fix for a poosible bug in gupnp



when a subscribe message with nt and callback arrives gupnp assumes it has timeout value as well but it is just recommended in the standard, in UPnP Device Architecture 1.0 revision 24 April 2008 on page 64.

 

Does the following diff make sense to you?

 

Regards,

Cem

 

--- a/gupnp/gupnp-0.13.0/libgupnp/gupnp-service.c

+++ b/gupnp/gupnp-0.13.0/libgupnp/gupnp-service.c

@@ -893,7 +893,7 @@ parse_and_limit_timeout (const char *timeout)

 

         timeout_seconds = 0;

 

-        if (strncmp (timeout, "Second-", strlen ("Second-")) == 0) {

+        if (timeout && strncmp (timeout, "Second-", strlen ("Second-")) == 0) {

                 /* We have a finite timeout */

                 timeout_seconds = CLAMP (atoi (timeout + strlen ("Second-")),

                                          GENA_MIN_TIMEOUT,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]