summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c2
1 files changed, 2 insertions, 0 deletions
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)) {