dect
/
linux-2.6
Archived
13
0
Fork 0

dect: csf: fix static system information slotnumber range check

Valid values are 0-11.

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2009-12-28 15:48:11 +01:00
parent 5026d4fc57
commit 74189d6e53
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@
* Copyright (c) 2009 Patrick McHardy <kaber@trash.net>
*/
#define DEBUG
//#define DEBUG
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/dect.h>

View File

@ -769,7 +769,7 @@ static int dect_parse_bearer_description(struct dect_tail_msg *tm, u64 t)
bd->sn = (t & DECT_PT_BEARER_SN_MASK) >> DECT_PT_BEARER_SN_SHIFT;
bd->sp = (t & DECT_PT_BEARER_SP_MASK) >> DECT_PT_BEARER_SP_SHIFT;
bd->cn = (t & DECT_PT_BEARER_CN_MASK) >> DECT_PT_BEARER_CN_SHIFT;
if (bd->sn > DECT_FRAME_SIZE)
if (bd->sn >= DECT_HALF_FRAME_SIZE)
return -1;
tm->type = DECT_TM_TYPE_BD;