Module: sip-router
Branch: tmp/tm_async_extensions
Commit: 7ba6cbfcaf70cb546ea3a9f148a0f0b0bc38c16d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7ba6cbf…
Author: Federico Cabiddu <fcabiddu(a)orange-vallee.net>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Jul 29 07:59:13 2013 +0200
acc: acc_db_set_table_name fixup
- add termination char to db_table_name_buf
---
modules/acc/acc_logic.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/acc/acc_logic.c b/modules/acc/acc_logic.c
index 55b4196..c9bdd20 100644
--- a/modules/acc/acc_logic.c
+++ b/modules/acc/acc_logic.c
@@ -197,6 +197,8 @@ int acc_db_set_table_name(struct sip_msg *msg, void *param, str
*table)
return -1;
}
strncpy(db_table_name_buf, dbtable.s, dbtable.len);
+ /* FS#327: since the buffer is static terminate the table name */
+ db_table_name_buf[dbtable.len] = '\0';
env_set_text(db_table_name_buf, dbtable.len);
} else {
if(table==NULL) {