Module: kamailio
Branch: master
Commit: 6d67bf0ed3451fa16bf98d0984af85f25c4c1b56
URL:
https://github.com/kamailio/kamailio/commit/6d67bf0ed3451fa16bf98d0984af85f…
Author: ng-voice GmbH <info(a)ng-voice.com>
Committer: GitHub <noreply(a)github.com>
Date: 2018-01-25T16:57:56+01:00
Merge pull request #1411 from christoph-v/wrong_query_buffer_assignment
ims_usrloc_scscf: assignment of length missing for query_buffer in
db_link_contact_to_impu()
---
Modified: src/modules/ims_usrloc_scscf/usrloc_db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6d67bf0ed3451fa16bf98d0984af85f…
Patch:
https://github.com/kamailio/kamailio/commit/6d67bf0ed3451fa16bf98d0984af85f…
---
diff --git a/src/modules/ims_usrloc_scscf/usrloc_db.c
b/src/modules/ims_usrloc_scscf/usrloc_db.c
index e1a7d4287e..b5301e0a3b 100644
--- a/src/modules/ims_usrloc_scscf/usrloc_db.c
+++ b/src/modules/ims_usrloc_scscf/usrloc_db.c
@@ -1079,7 +1079,7 @@ int db_link_contact_to_impu(impurecord_t* _r, ucontact_t* _c) {
}
- query_buffer_len = snprintf(query_buffer.s, query_buffer_len,
impu_contact_insert_query, _r->public_identity.len, _r->public_identity.s,
_c->c.len, _c->c.s);
+ query_buffer.len = snprintf(query_buffer.s, query_buffer_len,
impu_contact_insert_query, _r->public_identity.len, _r->public_identity.s,
_c->c.len, _c->c.s);
LM_DBG("QUERY IS [%.*s] and len is %d\n", query_buffer.len, query_buffer.s,
query_buffer.len);
if (ul_dbf.raw_query(ul_dbh, &query_buffer, &rs) != 0) {