diff --git a/upnpsoap.c b/upnpsoap.c index ac343b1..3f2e407 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -235,6 +235,8 @@ set_filter_flags(char * filter) char *item, *saveptr = NULL; u_int32_t flags = 0; + if( !filter || (strlen(filter) <= 1) ) + return 0xFFFFFFFF; item = strtok_r(filter, ",", &saveptr); while( item != NULL ) {