From 97c18d89852068b29e9e4100caa451de06c0700c Mon Sep 17 00:00:00 2001 From: markster Date: Thu, 17 Jul 2003 03:48:31 +0000 Subject: Ensure writes are positive amount of data (oops) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@215 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- zaptel.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'zaptel.c') diff --git a/zaptel.c b/zaptel.c index d4a3098..db098f6 100755 --- a/zaptel.c +++ b/zaptel.c @@ -1472,6 +1472,8 @@ static ssize_t zt_chan_write(struct file *file, const char *usrbuf, size_t count int res, amnt, oldbuf, rv,x; if (!chan) return -EINVAL; + if (count < 1) + return -EINVAL; for(;;) { spin_lock_irqsave(&chan->lock, flags); if (chan->curtone && !(chan->flags & ZT_FLAG_PSEUDO)) { -- cgit v1.2.3