diff options
author | Richard Mudgett <rmudgett@digium.com> | 2015-10-19 15:27:40 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2015-10-21 16:49:13 -0500 |
commit | a04d946eaa36e1a1cc414fc02147379768a96120 (patch) | |
tree | 69444246cee7d8872bcbb98eb263c9ba076e5290 /main/xmldoc.c | |
parent | 41f9fd56fb5213f358e2e63b6882dd7ee2278831 (diff) |
Add missing failure checks to ast_str_set_va() callers.
Change-Id: I0c2cdcd53727bdc6634095c61294807255bd278f
Diffstat (limited to 'main/xmldoc.c')
-rw-r--r-- | main/xmldoc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/xmldoc.c b/main/xmldoc.c index 399a7be97..86c3f6512 100644 --- a/main/xmldoc.c +++ b/main/xmldoc.c @@ -2646,14 +2646,18 @@ struct ast_xml_xpath_results *__attribute__((format(printf, 1, 2))) ast_xmldoc_q struct documentation_tree *doctree; RAII_VAR(struct ast_str *, xpath_str, ast_str_create(128), ast_free); va_list ap; + int res; if (!xpath_str) { return NULL; } va_start(ap, fmt); - ast_str_set_va(&xpath_str, 0, fmt, ap); + res = ast_str_set_va(&xpath_str, 0, fmt, ap); va_end(ap); + if (res == AST_DYNSTR_BUILD_FAILED) { + return NULL; + } AST_RWLIST_RDLOCK(&xmldoc_tree); AST_LIST_TRAVERSE(&xmldoc_tree, doctree, entry) { |