<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6373">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/73/6373/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 dd80c34..039eeed 100644<br>--- a/apps/app_directory.c<br>+++ b/apps/app_directory.c<br>@@ -509,6 +509,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/6373">change 6373</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/6373"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </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: 6373 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>