<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8209">View Change</a></p><p>Patch set 4:</p><p>(1 comment)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8209/4/main/media_cache.c">File main/media_cache.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8209/4/main/media_cache.c@164">Patch Set #4, Line 164:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">                                    /* Not updating the original ext here to keep the key for media-cache same */<br>                                 snprintf(temp_ext, strlen(temp_ext), ".%s", tmp);<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">temp_ext is defined as PATH_MAX. I think it is safe to assume that an exten</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">You are passing strlen(temp_ext) to snprintf() not sizeof(temp_ext).</p><p style="white-space: pre-wrap; word-wrap: break-word;">Also I don't understand the limitation mentioned by the comment.  The file extension in tmp could be longer than the original file extension.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8209">change 8209</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/8209"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I1b14692a49b2c1ac67688f58757184122e92ba89 </div>
<div style="display:none"> Gerrit-Change-Number: 8209 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Gaurav Khurana <gkhurana@godaddy.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Matt Jordan <mjordan@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 06 Mar 2018 16:39:46 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>