Module: kamailio
Branch: 5.6
Commit: 9daacc36e3ed858eca97e9b7ac7eaa90e10c0803
URL:
https://github.com/kamailio/kamailio/commit/9daacc36e3ed858eca97e9b7ac7eaa9…
Author: Pantelis Kolatsis <pk(a)gilawa.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-07-17T10:32:11+02:00
sqlops: do not allow empty name component in URL
(cherry picked from commit b15db86e93120824dcfc879099432f3ec1c3b0c7)
---
Modified: src/modules/sqlops/sql_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9daacc36e3ed858eca97e9b7ac7eaa9…
Patch:
https://github.com/kamailio/kamailio/commit/9daacc36e3ed858eca97e9b7ac7eaa9…
---
diff --git a/src/modules/sqlops/sql_api.c b/src/modules/sqlops/sql_api.c
index 63c035ca89e..eed82f0a149 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'))