On 2017/01/02 12:55, Sebastian Reitenbach wrote:
> Hi,
>
> haven't used net/coccinella for a while as iax client, and now found it
> aborting under some circumstances while doing a call.
>
> a simple memcpy -> memmove seems to have made the problem disappear for me.
>
> OK?
OK - this is also present in telephony/spandsp.
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/telephony/iaxclient/Makefile,v
> retrieving revision 1.32
> diff -u -r1.32 Makefile
> --- Makefile 4 Apr 2016 16:09:10 -0000 1.32
> +++ Makefile 2 Jan 2017 11:50:21 -0000
> @@ -6,7 +6,7 @@
>
> DISTNAME= iaxclient-2.1beta3
> PKGNAME-main= ${DISTNAME}
> -REVISION-main= 15
> +REVISION-main= 16
> PKGNAME-tcl= ${DISTNAME:S/iaxclient/iaxclient-tcl/}
> REVISION-tcl= 17
> PKGNAME-iaxcomm= iaxcomm-1.1.0
> Index: patches/patch-lib_spandsp_plc_c
> ===================================================================
> RCS file: patches/patch-lib_spandsp_plc_c
> diff -N patches/patch-lib_spandsp_plc_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-lib_spandsp_plc_c 2 Jan 2017 11:50:21 -0000
> @@ -0,0 +1,15 @@
> +$OpenBSD$
> +
> +memcpy -> memmove
> +
> +--- lib/spandsp/plc.c.orig Mon Jan 2 12:29:58 2017
> ++++ lib/spandsp/plc.c Mon Jan 2 12:33:28 2017
> +@@ -99,7 +99,7 @@ static void normalise_history(plc_state_t *s)
> + if (s->buf_ptr == 0)
> + return;
> + memcpy(tmp, s->history, sizeof(int16_t)*s->buf_ptr);
> +- memcpy(s->history, s->history + s->buf_ptr,
> sizeof(int16_t)*(PLC_HISTORY_LEN - s->buf_ptr));
> ++ memmove(s->history, s->history + s->buf_ptr,
> sizeof(int16_t)*(PLC_HISTORY_LEN - s->buf_ptr));
> + memcpy(s->history + PLC_HISTORY_LEN - s->buf_ptr, tmp,
> sizeof(int16_t)*s->buf_ptr);
> + s->buf_ptr = 0;
> + }
>
>