git:4.0: acc: acc_db_set_table_name fixup
Module: sip-router Branch: 4.0 Commit: ece14d42fda4baefc4f0e8465faad17b678a6a4b URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ece14d42... Author: Federico Cabiddu <fcabiddu@orange-vallee.net> Committer: Daniel-Constantin Mierla <miconda@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 (cherry picked from commit 7ba6cbfcaf70cb546ea3a9f148a0f0b0bc38c16d) --- 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) {
participants (1)
-
Daniel-Constantin Mierla