[Asterisk-code-review] res_pjsip_history.c: Fix to stop SIGSEGV when IPv6 addresses are enco... (asterisk[master])
Roger James
asteriskteam at digium.com
Sat May 9 03:30:58 CDT 2020
Roger James has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14403 )
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 source and destination address fields in struct pjsip_history_entry
so that they are long enough to hold an IPv6 address. The ipv6 fields are dummies
and are never used in the code. All accesses are via the ipv4 fields cast to a
void pointer.
ASTERISK-28854
Change-Id: Id65bb9aa961e9ecbcb500815e18170f774e34d3e
---
M res/res_pjsip_history.c
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/03/14403/1
diff --git a/res/res_pjsip_history.c b/res/res_pjsip_history.c
index 10bcd96..f7cd978 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_in6 src6;
+ };
/*! \brief Destination address */
- pj_sockaddr_in dst;
+ union {
+ pj_sockaddr_in dst;
+ pj_sockaddr_in6 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/+/14403
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Id65bb9aa961e9ecbcb500815e18170f774e34d3e
Gerrit-Change-Number: 14403
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/20200509/d5b28e01/attachment.html>
More information about the asterisk-code-review
mailing list