Module: kamailio
Branch: master
Commit: b15db86e93120824dcfc879099432f3ec1c3b0c7
URL:
https://github.com/kamailio/kamailio/commit/b15db86e93120824dcfc879099432f3…
Author: Pantelis Kolatsis <pk(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2023-03-06T10:44:19Z
sqlops: do not allow empty name component in URL
---
Modified: src/modules/sqlops/sql_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b15db86e93120824dcfc879099432f3…
Patch:
https://github.com/kamailio/kamailio/commit/b15db86e93120824dcfc879099432f3…
---
diff --git a/src/modules/sqlops/sql_api.c b/src/modules/sqlops/sql_api.c
index 237ddd8c1e..eaa03de6fd 100644
--- a/src/modules/sqlops/sql_api.c
+++ b/src/modules/sqlops/sql_api.c
@@ -677,6 +677,9 @@ int sql_parse_param(char *val)
if(p>in.s+in.len || *p=='\0')
goto error;
name.len = p - name.s;
+ if(name.len==0) {
+ goto error;
+ }
if(*p!='=')
{
while(p<in.s+in.len && (*p==' ' || *p=='\t' ||
*p=='\n' || *p=='\r'))