Eliminate 'unsafe vsprintf is deprecated' compiler warning
authorIvan Maidanski <ivmai@mail.ru>
Fri, 28 Oct 2016 06:35:33 +0000 (09:35 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 28 Oct 2016 07:02:12 +0000 (10:02 +0300)
commitc10a1d900afabeaf1c8c2f7011bed31d2c572f02
treeea0eec399785fa0c498b1aa4117de0d5523a2ebc
parent311a0fceb7a6e81da99547f74d520f0ebf43c5ff
Eliminate 'unsafe vsprintf is deprecated' compiler warning

Replacement of vsprintf to vsnprintf (or similar) if available.

Note that no buffer overflow occurs in CORD_vsprintf as buf is
allocated dynamically based on format string.

* cord/cordprnt.c (GC_VSNPRINTF): New macro (the definition is copied
from misc.c).
* cord/cordprnt.c (CORD_vsprintf): Replace vsprintf(buf,...) call with
GC_VSNPRINTF(buf,max_size+1,...).
cord/cordprnt.c