strings.c: Fix __ast_str_helper() to always return a terminated string.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 19 Oct 2015 20:28:46 +0000 (15:28 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 21 Oct 2015 21:49:13 +0000 (16:49 -0500)
commit1ce62b2545b08c2136ee35d9be6fad5c04f81ec0
tree16cb2b80e44bf2f77c1f1d5e7400450c8f027a40
parenta04d946eaa36e1a1cc414fc02147379768a96120
strings.c: Fix __ast_str_helper() to always return a terminated string.

Users of functions which call __ast_str_helper() such as the ones listed
below are likely to not check the return value for failure so ensuring
that the string is always nil terminated is a good safety measure.

ast_str_set_va()
ast_str_append_va()
ast_str_set()
ast_str_append()

Change-Id: I36ab2d14bb6015868b49329dda8639d70fbcae07
main/strings.c