Module: kamailio
Branch: 5.5
Commit: 2a5c590ae8e3fb435670d0bd97deda35d22a33ad
URL:
https://github.com/kamailio/kamailio/commit/2a5c590ae8e3fb435670d0bd97deda3…
Author: Pantelis Kolatsis <pk(a)gilawa.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-07-17T11:16:10+02:00
sqlops: do not allow empty name component in URL
(cherry picked from commit b15db86e93120824dcfc879099432f3ec1c3b0c7)
(cherry picked from commit 9daacc36e3ed858eca97e9b7ac7eaa90e10c0803)
---
Modified: src/modules/sqlops/sql_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2a5c590ae8e3fb435670d0bd97deda3…
Patch:
https://github.com/kamailio/kamailio/commit/2a5c590ae8e3fb435670d0bd97deda3…
---
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'))