diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-07-07 21:35:46 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-07-07 21:35:46 +0200 |
commit | e4035a86cf92e6eab3585a11398b2e44f2ef7615 (patch) | |
tree | 06f3b1f292885470c33c20ccb63825da63ef8f06 /src | |
parent | ed607f475fa11390d5f9ae78de4d12f49fc38841 (diff) |
RSL: ciphering IE length can be '1' in case of 'no ciphering'
Diffstat (limited to 'src')
-rw-r--r-- | src/common/rsl.c | 3 |
1 files changed, 2 insertions, 1 deletions
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++; |