[sr-dev] [kamailio] core: fixed passed buffer size in suip2a() (#381)

topotomaso notifications at github.com
Mon Oct 26 12:00:31 CET 2015


- fix regarding issue #379
- it makes sense to backport this fix to 4.2 and 4.3
- Function suip2a() has never worked properly for IPv6 addresses before.
  The passed buffer size 'sizeof(buf)-4' to ip6tosbuf() was 1 byte to small.
  So ip6tosbuf() has never written any IPv6 ASCII string to the buffer and
  therefor suip2a() always returned an empty IPv6 reference string ("[]").
  Fixed this by changing passed buffer size to IP6_MAX_STR_SIZE.
  For similarity also changed uncritical passed buffer size in call to
  ip4tosbuf() to IP4_MAX_STR_SIZE.
  The function suip2a() is only used by siptrace module when sip_trace()
  script function is explicitly called on sending side e.g. in onsend_route
  block.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/381

-- Commit Summary --

  * core: fixed passed buffer size in suip2a()

-- File Changes --

    M ip_addr.h (4)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/381.patch
https://github.com/kamailio/kamailio/pull/381.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/381
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151026/85792fd6/attachment.html>


More information about the sr-dev mailing list