From 249d7c2790a1b99f422bc4afbab3aadba7e268e6 Mon Sep 17 00:00:00 2001
From: Jonathan Rose <jrose@digium.com>
Date: Tue, 28 May 2013 17:43:23 +0000
Subject: [PATCH] Fix a memory copying bug in slinfactory which was causing
 mixmonitor issues.

Reported by: Michael Walton
Tested by: Jonathan Rose
Patches:
    slinfactory.c.ASTERISK-21799.patch uploaded by Michael Walton (license 6502)
(closes issue ASTERISK-21799)
........

Merged revisions 389895 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@389896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 main/slinfactory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/slinfactory.c b/main/slinfactory.c
index 921edb0903..687a6c02db 100644
--- a/main/slinfactory.c
+++ b/main/slinfactory.c
@@ -147,7 +147,7 @@ int ast_slinfactory_read(struct ast_slinfactory *sf, short *buf, size_t samples)
 
 		if (sf->holdlen) {
 			if (sf->holdlen <= ineed) {
-				memcpy(offset, sf->hold, sf->holdlen * sizeof(*offset));
+				memcpy(offset, sf->offset, sf->holdlen * sizeof(*offset));
 				sofar += sf->holdlen;
 				offset += sf->holdlen;
 				sf->holdlen = 0;
-- 
GitLab