[Asterisk-code-review] format cap.c: Fix CLI "core show channeltype Surrogate" crash. (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Fri Sep 2 12:56:22 CDT 2016
Richard Mudgett has uploaded a new change for review.
https://gerrit.asterisk.org/3788
Change subject: format_cap.c: Fix CLI "core show channeltype Surrogate" crash.
......................................................................
format_cap.c: Fix CLI "core show channeltype Surrogate" crash.
* Make ast_format_cap_get_names() NULL tolerant.
ASTERISK-26331 #close
Reported by: CGI.NET
Change-Id: Id67e93936dc8ec2a33a9d33655843d43b59285a3
---
M main/format_cap.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/88/3788/1
diff --git a/main/format_cap.c b/main/format_cap.c
index 2b3e6cd..013b7be 100644
--- a/main/format_cap.c
+++ b/main/format_cap.c
@@ -703,7 +703,7 @@
ast_str_set(buf, 0, "(");
- if (!AST_VECTOR_SIZE(&cap->preference_order)) {
+ if (!cap || !AST_VECTOR_SIZE(&cap->preference_order)) {
ast_str_append(buf, 0, "nothing)");
return ast_str_buffer(*buf);
}
--
To view, visit https://gerrit.asterisk.org/3788
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id67e93936dc8ec2a33a9d33655843d43b59285a3
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list