<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6371">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_directory: Handle a NULL mailbox without crashing<br><br>ASTERISK-27241 #close<br>Reported by: David Moore<br><br>Change-Id: Ibbbca85517b04c315406ebfe3b6f7e0763daedc6<br>---<br>M apps/app_directory.c<br>1 file changed, 5 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/71/6371/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_directory.c b/apps/app_directory.c<br>index 95cb0d9..a61fac8 100644<br>--- a/apps/app_directory.c<br>+++ b/apps/app_directory.c<br>@@ -511,6 +511,11 @@<br>          const char *mailbox = ast_variable_retrieve(rtdata, category, "mailbox");<br>           const char *ctx = ast_variable_retrieve(rtdata, category, "context");<br> <br>+           if (ast_strlen_zero(mailbox)) {<br>+                      ast_log(LOG_WARNING, "Skipping result with missing or empty mailbox\n");<br>+                   continue;<br>+            }<br>+<br>          fullname = ast_variable_retrieve(rtdata, category, "fullname");<br>             hidefromdir = ast_variable_retrieve(rtdata, category, "hidefromdir");<br>               if (ast_true(hidefromdir)) {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6371">change 6371</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/6371"/><meta itemprop="name" content="View Change"/></div></div>

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