<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16549">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_read: Fix null pointer crash<br><br>If the terminator character is explicitly removed,<br>there is no null pointer check so Asterisk crashes.<br>This adds the null check to prevent crashes.<br><br>ASTERISK-29673 #close<br><br>Change-Id: Ie941833e123c3dbfb88371b5de5edbbe065514ac<br>---<br>M apps/app_read.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/49/16549/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_read.c b/apps/app_read.c</span><br><span>index dd48f05..bc1df21 100644</span><br><span>--- a/apps/app_read.c</span><br><span>+++ b/apps/app_read.c</span><br><span>@@ -250,7 +250,7 @@</span><br><span>                                            break;</span><br><span>                                       }</span><br><span>                                    tmp[x++] = res;</span><br><span style="color: hsl(0, 100%, 40%);">-                                 if (strchr(terminator, tmp[x-1])) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                   if (terminator && strchr(terminator, tmp[x-1])) {</span><br><span>                                            tmp[x-1] = '\0';</span><br><span>                                             status = "OK";</span><br><span>                                             break;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16549">change 16549</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/16549"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: Ie941833e123c3dbfb88371b5de5edbbe065514ac </div>
<div style="display:none"> Gerrit-Change-Number: 16549 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>