<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13632">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_voicemail: Prevent crash when saving message with realtime voicemail<br><br>ast_store_realtime() is not NULL tolerant, so we need to initialize<br>the field values we pass to it to the empty string to avoid a crash.<br><br>ASTERISK-23739 #close<br>Reported by: Stas Kobzar<br><br>Change-Id: I756c5dd0299c77f4274368f7c99eb0464367466c<br>---<br>M apps/app_voicemail.c<br>1 file changed, 6 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c</span><br><span>index 184c4f9..d8a63ec 100644</span><br><span>--- a/apps/app_voicemail.c</span><br><span>+++ b/apps/app_voicemail.c</span><br><span>@@ -4786,11 +4786,15 @@</span><br><span> static void copy_plain_file(char *frompath, char *topath)</span><br><span> {</span><br><span> char frompath2[PATH_MAX], topath2[PATH_MAX];</span><br><span style="color: hsl(0, 100%, 40%);">- struct ast_variable *tmp,*var = NULL;</span><br><span style="color: hsl(0, 100%, 40%);">- const char *origmailbox = NULL, *context = NULL, *macrocontext = NULL, *exten = NULL, *priority = NULL, *callerchan = NULL, *callerid = NULL, *origdate = NULL, *origtime = NULL, *category = NULL, *duration = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_variable *tmp, *var = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *origmailbox = "", *context = "", *macrocontext = "", *exten = "";</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *priority = "", *callerchan = "", *callerid = "", *origdate = "";</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *origtime = "", *category = "", *duration = "";</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ast_filecopy(frompath, topath, NULL);</span><br><span> snprintf(frompath2, sizeof(frompath2), "%s.txt", frompath);</span><br><span> snprintf(topath2, sizeof(topath2), "%s.txt", topath);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (ast_check_realtime("voicemail_data")) {</span><br><span> var = ast_load_realtime("voicemail_data", "filename", frompath, SENTINEL);</span><br><span> /* This cycle converts ast_variable linked list, to va_list list of arguments, may be there is a better way to do it? */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13632">change 13632</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/+/13632"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I756c5dd0299c77f4274368f7c99eb0464367466c </div>
<div style="display:none"> Gerrit-Change-Number: 13632 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>