Module: kamailio
Branch: 5.1
Commit: f17dd0d8c884f0264a1bfb64124caa69e119ca23
URL:
https://github.com/kamailio/kamailio/commit/f17dd0d8c884f0264a1bfb64124caa6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2018-01-29T20:17:26+01:00
Merge pull request #1415 from christoph-v/wrong_query_buffer_assignment_5.1
ims_usrloc_scscf: assignment of length missing for query_buffer in
db_link_contact_to_impu() - 5.1
---
Modified: src/modules/ims_usrloc_scscf/usrloc_db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f17dd0d8c884f0264a1bfb64124caa6…
Patch:
https://github.com/kamailio/kamailio/commit/f17dd0d8c884f0264a1bfb64124caa6…
---
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) {