<p>Roger James has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14403">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_history.c: Fix to stop SIGSEGV when IPv6 addresses are encountered.<br><br>Changed source and destination address fields in struct pjsip_history_entry<br>so that they are long enough to hold an IPv6 address. The ipv6 fields are dummies<br>and are never used in the code. All accesses are via the ipv4 fields cast to a<br>void pointer.<br><br>ASTERISK-28854<br><br>Change-Id: Id65bb9aa961e9ecbcb500815e18170f774e34d3e<br>---<br>M res/res_pjsip_history.c<br>1 file changed, 8 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/03/14403/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_history.c b/res/res_pjsip_history.c</span><br><span>index 10bcd96..f7cd978 100644</span><br><span>--- a/res/res_pjsip_history.c</span><br><span>+++ b/res/res_pjsip_history.c</span><br><span>@@ -64,9 +64,15 @@</span><br><span>     /*! \brief Time the packet was transmitted/received */</span><br><span>       struct timeval timestamp;</span><br><span>    /*! \brief Source address */</span><br><span style="color: hsl(0, 100%, 40%);">-    pj_sockaddr_in src;</span><br><span style="color: hsl(120, 100%, 40%);">+   union {</span><br><span style="color: hsl(120, 100%, 40%);">+               pj_sockaddr_in src;</span><br><span style="color: hsl(120, 100%, 40%);">+           pj_sockaddr_in6 src6;</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span>   /*! \brief Destination address */</span><br><span style="color: hsl(0, 100%, 40%);">-       pj_sockaddr_in dst;</span><br><span style="color: hsl(120, 100%, 40%);">+   union {</span><br><span style="color: hsl(120, 100%, 40%);">+               pj_sockaddr_in dst;</span><br><span style="color: hsl(120, 100%, 40%);">+           pj_sockaddr_in6 dst6;</span><br><span style="color: hsl(120, 100%, 40%);">+ };</span><br><span>   /*! \brief Memory pool used to allocate \c msg */</span><br><span>    pj_pool_t *pool;</span><br><span>     /*! \brief The actual SIP message */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14403">change 14403</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/+/14403"/><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-Change-Id: Id65bb9aa961e9ecbcb500815e18170f774e34d3e </div>
<div style="display:none"> Gerrit-Change-Number: 14403 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Roger James <roger@beardandsandals.co.uk> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>