<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/5958">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">core: Fix segfault when invoking 'data get' CLI command<br><br>Invoking 'data get /asterisk/core/channeltypes' caused a crash because<br>of an assumption of a tech's capabilities to be non-NULL. The<br>'Surrogate' tech, however, does have a NULL capabilities member,<br>resulting in a crash.<br><br>ASTERISK-27108 #close<br><br>Change-Id: I2fbe7715681f43d5565d1e1599269468c26b0e0a<br>---<br>M main/data.c<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/58/5958/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/data.c b/main/data.c<br>index 33a7c04..5972949 100644<br>--- a/main/data.c<br>+++ b/main/data.c<br>@@ -3145,6 +3145,10 @@<br>               return -1;<br>    }<br> <br>+ if (!cap) {<br>+          return 0;<br>+    }<br>+<br>  count = ast_format_cap_count(cap);<br>    for (i = 0; i < count; ++i) {<br>              struct ast_format *fmt;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/5958">change 5958</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/5958"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I2fbe7715681f43d5565d1e1599269468c26b0e0a </div>
<div style="display:none"> Gerrit-Change-Number: 5958 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>