[svn-commits] sruffell: linux/trunk r5383 - /linux/trunk/drivers/dahdi/tor2.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 25 13:59:16 CST 2008


Author: sruffell
Date: Tue Nov 25 13:59:15 2008
New Revision: 5383

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5383
Log:
Validate that the span priority is valid in the tor2 driver.

Patch provided by tzafrir.

Modified:
    linux/trunk/drivers/dahdi/tor2.c

Modified: linux/trunk/drivers/dahdi/tor2.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/tor2.c?view=diff&rev=5383&r1=5382&r2=5383
==============================================================================
--- linux/trunk/drivers/dahdi/tor2.c (original)
+++ linux/trunk/drivers/dahdi/tor2.c Tue Nov 25 13:59:15 2008
@@ -200,6 +200,11 @@
 	if (debug)
 		printk(KERN_INFO "Tor2: Configuring span %d\n", span->spanno);
 
+	if ((lc->sync < 0) || (lc->sync >= MAX_TOR_CARDS)) {
+		printk(KERN_WARNING "%s %d: invalid span timing value %d.\n",
+				THIS_MODULE->name, span->spanno, lc->sync);
+		return -EINVAL;
+	}
 	span->syncsrc = p->tor->syncsrc;
 	
 	/* remove this span number from the current sync sources, if there */




More information about the svn-commits mailing list