[Asterisk-code-review] res_pjsip_history.c: Fix to stop SIGSEGV when IPv6 addresses are enco... (asterisk[master])
Roger James
asteriskteam at digium.com
Fri May 8 15:48:23 CDT 2020
Roger James has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14402 )
Change subject: res_pjsip_history.c: Fix to stop SIGSEGV when IPv6 addresses are encountered.
......................................................................
res_pjsip_history.c: Fix to stop SIGSEGV when IPv6 addresses are encountered.
Changed to source and destination address fields in struct pjsip_history_entry
so that they are long enough to hold an IPv6 address.
ASTERISK-28854
Change-Id: I3579e0b806119fd922e11da35f4b2dbda4a1a4ca
---
M res/res_pjsip_history.c
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/02/14402/1
diff --git a/res/res_pjsip_history.c b/res/res_pjsip_history.c
index 10bcd96..2f568c4 100644
--- a/res/res_pjsip_history.c
+++ b/res/res_pjsip_history.c
@@ -64,9 +64,15 @@
/*! \brief Time the packet was transmitted/received */
struct timeval timestamp;
/*! \brief Source address */
- pj_sockaddr_in src;
+ union {
+ pj_sockaddr_in src;
+ pj_sockaddr_in src6;
+ };
/*! \brief Destination address */
- pj_sockaddr_in dst;
+ union {
+ pj_sockaddr_in dst;
+ pj_sockaddr_in dst6;
+ };
/*! \brief Memory pool used to allocate \c msg */
pj_pool_t *pool;
/*! \brief The actual SIP message */
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14402
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I3579e0b806119fd922e11da35f4b2dbda4a1a4ca
Gerrit-Change-Number: 14402
Gerrit-PatchSet: 1
Gerrit-Owner: Roger James <roger at beardandsandals.co.uk>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200508/23367dfa/attachment.html>
More information about the asterisk-code-review
mailing list