From bde8d228274e7e9e708837fd5c7a5561aa7e6255 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 11 Apr 2007 19:01:21 +0000 Subject: Fix buglet in memory corruption fix. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2405 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- zaptel-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zaptel-base.c') diff --git a/zaptel-base.c b/zaptel-base.c index 842a145..0b34057 100644 --- a/zaptel-base.c +++ b/zaptel-base.c @@ -1728,7 +1728,7 @@ static ssize_t zt_chan_read(struct file *file, char *usrbuf, size_t count, int u chan->readidx[res] = 0; chan->readn[res] = 0; oldbuf = res; - res = (chan->outreadbuf + 1) % chan->numbufs; + chan->outreadbuf = (res + 1) % chan->numbufs; if (chan->outreadbuf == chan->inreadbuf) { /* Out of stuff */ chan->outreadbuf = -1; -- cgit v1.2.3