<p> Attention is currently required from: Holger Hans Peter Freyther. </p>
<p>Sean Bright <strong>uploaded patch set #3</strong> to the change originally created by Holger Hans Peter Freyther.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/19717">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_http_media_cache: Do not crash when there is no extension<br><br>Do not crash when a URL has no path component as in this case the<br>ast_uri_path function will return NULL. Make the code cope with not<br>having a path.<br><br>The below would crash<br>> media cache create http://google.com /tmp/foo.wav<br><br>Thread 1 "asterisk" received signal SIGSEGV, Segmentation fault.<br>0x0000ffff836616cc in strrchr () from /lib/aarch64-linux-gnu/libc.so.6<br>(gdb) bt<br> #0  0x0000ffff836616cc in strrchr () from /lib/aarch64-linux-gnu/libc.so.6<br> #1  0x0000ffff43d43a78 in file_extension_from_string (str=<optimized out>, buffer=buffer@entry=0xffffca9973c0 "",<br>    capacity=capacity@entry=64) at res_http_media_cache.c:288<br> #2  0x0000ffff43d43bac in file_extension_from_url_path (bucket_file=bucket_file@entry=0x3bf96568,<br>    buffer=buffer@entry=0xffffca9973c0 "", capacity=capacity@entry=64) at res_http_media_cache.c:378<br> #3  0x0000ffff43d43c74 in bucket_file_set_extension (bucket_file=bucket_file@entry=0x3bf96568) at res_http_media_cache.c:392<br> #4  0x0000ffff43d43d10 in bucket_file_run_curl (bucket_file=0x3bf96568) at res_http_media_cache.c:555<br> #5  0x0000ffff43d43f74 in bucket_http_wizard_create (sorcery=<optimized out>, data=<optimized out>, object=<optimized out>)<br>    at res_http_media_cache.c:613<br> #6  0x0000000000487638 in bucket_file_wizard_create (sorcery=<optimized out>, data=<optimized out>, object=<optimized out>)<br>    at bucket.c:191<br> #7  0x0000000000554408 in sorcery_wizard_create (object_wizard=object_wizard@entry=0x3b9f0718,<br>    details=details@entry=0xffffca9974a8) at sorcery.c:2027<br> #8  0x0000000000559698 in ast_sorcery_create (sorcery=<optimized out>, object=object@entry=0x3bf96568) at sorcery.c:2077<br> #9  0x00000000004893a4 in ast_bucket_file_create (file=file@entry=0x3bf96568) at bucket.c:727<br> #10 0x00000000004f877c in ast_media_cache_create_or_update (uri=0x3bfa1103 "https://google.com",<br>    file_path=0x3bfa1116 "/tmp/foo.wav", metadata=metadata@entry=0x0) at media_cache.c:335<br> #11 0x00000000004f88ec in media_cache_handle_create_item (e=<optimized out>, cmd=<optimized out>, a=0xffffca9976b8)<br>    at media_cache.c:640<br><br>ASTERISK-30375 #close<br><br>Change-Id: I6a9433688cb5d3d4be8758b7642d923bdde6c273<br>---<br>M res/res_http_media_cache.c<br>1 file changed, 49 insertions(+), 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/17/19717/3</pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19717">change 19717</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/+/19717"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 20 </div>
<div style="display:none"> Gerrit-Change-Id: I6a9433688cb5d3d4be8758b7642d923bdde6c273 </div>
<div style="display:none"> Gerrit-Change-Number: 19717 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Holger Hans Peter Freyther <automatic@freyther.de> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: N A <asterisk@phreaknet.org> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-Attention: Holger Hans Peter Freyther <automatic@freyther.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>