diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-11-25 21:01:04 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-11-25 21:01:04 +0000 |
commit | e66e3069a210598a952fdcab793847f9ce045be5 (patch) | |
tree | 049af33adb89f56ffd68298fc409cc38c5bf5774 /kernel/torisa.c | |
parent | b64e3d2f1210d6eccd0af0d4b9b1bda006384b32 (diff) |
Fix handling of an invalid timing (sync) parameter in DAHDI_SPANCONFIG.
Fixing issue #13954 in zaptel 1.4
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4588 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'kernel/torisa.c')
-rw-r--r-- | kernel/torisa.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/torisa.c b/kernel/torisa.c index 4f02147..f0a8909 100644 --- a/kernel/torisa.c +++ b/kernel/torisa.c @@ -603,6 +603,11 @@ 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; + } span->syncsrc = syncsrc; /* remove this span number from the current sync sources, if there */ |