From e4035a86cf92e6eab3585a11398b2e44f2ef7615 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 7 Jul 2011 21:35:46 +0200 Subject: RSL: ciphering IE length can be '1' in case of 'no ciphering' --- src/common/rsl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/rsl.c b/src/common/rsl.c index fa732957..734c8bb4 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -518,7 +518,8 @@ static void copy_sacch_si_to_lchan(struct gsm_lchan *lchan) static int encr_info2lchan(struct gsm_lchan *lchan, const uint8_t *val, uint8_t len) { - if (len < 2) + /* length can be '1' in case of no ciphering */ + if (len < 1) return -EINVAL; lchan->encr.alg_id = *val++; -- cgit v1.2.3