[sr-dev] [kamailio/kamailio] pv: Use memcpy to copy len bytes instead of strcpy (#832)

Holger Freyther notifications at github.com
Tue Oct 25 19:46:38 CEST 2016


The sipcapture plugin stores bytes with VAR_VAL_STR and when
copying the data it would end up being truncated. Use memcpy
instead of strncpy and assume that the original string already
has the NUL termination (or not as with the hep plugin).

Config example:

	$var(payload) = hep(0x00f)
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * pv: Use memcpy to copy len bytes instead of strcpy

-- File Changes --

    M modules/pv/pv_svar.c (8)

-- Patch Links --

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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/832
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20161025/63f63b61/attachment.html>


More information about the sr-dev mailing list