Browse code

core: catch empty string on parsing params

(cherry picked from commit 76e6033ff14fec0f2db0b387803b4c5815a91163)
(cherry picked from commit d40de01737781f12cb2383a2891c8590cfb7deba)

Daniel-Constantin Mierla authored on 06/09/2021 12:56:36
Showing 1 changed files
... ...
@@ -584,7 +584,7 @@ int parse_params2(
584 584
 		memset(_h, 0, sizeof(param_hooks_t));
585 585
 	*_p = 0;
586 586
 
587
-	if(!_s->s) { /* no parameters at all -- we're done */
587
+	if(!_s->s || _s->len<=0) { /* no parameters at all -- we're done */
588 588
 		LM_DBG("empty uri params, skipping\n");
589 589
 		return 0;
590 590
 	}