From 8623c62b7709991b5f7c667e6696d046eb9c9b63 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Tue, 25 Nov 2008 20:59:19 +0000 Subject: Fixing issue #13954 in zaptel 1.2. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@4587 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- torisa.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'torisa.c') diff --git a/torisa.c b/torisa.c index 3b3b163..3af2123 100644 --- a/torisa.c +++ b/torisa.c @@ -602,6 +602,13 @@ static int torisa_spanconfig(struct zt_span *span, struct zt_lineconfig *lc) { if (debug) printk("TorISA: Configuring span %d\n", span->spanno); + + if ((lc->sync < 0) || (lc->sync >= 2)) { + printk(KERN_WARNING "%s %d: invalid span timing value %d.\n", + THIS_MODULE->name, span->spanno, lc->sync); + return -EINVAL; + } + /* XXX We assume lineconfig is okay and shouldn't XXX */ span->lineconfig = lc->lineconfig; span->txlevel = lc->lbo; -- cgit v1.2.3