]> git.ipfire.org Git - thirdparty/asterisk.git/commit
addons/res_config_mysql: Don't mutate va_list parameters 77/277/1
authorIvan Poddubny <ivan.poddubny@gmail.com>
Wed, 29 Apr 2015 06:24:58 +0000 (06:24 +0000)
committerIvan Poddubny <ivan.poddubny@gmail.com>
Wed, 29 Apr 2015 07:59:39 +0000 (07:59 +0000)
commit41bf52315a5eb495fdcef65bd7cbdc89b4f29842
treec5669c7a2d8996a1798428c433fd1beceb114bc8
parent9bee1cae12dce1658586c55bf930c813f6f7b34e
addons/res_config_mysql: Don't mutate va_list parameters

The realtime API passes down the va_list argument to each RT engine in
failover chain until one succeeds. MySQL engine used to access the
variable argument list with va_arg, which mutates the va_list, so the
next engine in failover chain gets invalid agrument list.
This patch uses va_copy to preserve the original va_list argument intact.

ASTERISK-19538 #close
Reported by: alexat
Tested by: Ivan Poddubny

Change-Id: I7738b9f98bde81ddfbc2c0fa579d85a0c3e580ae
addons/res_config_mysql.c