diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-03-16 10:23:34 +0100 |
---|---|---|
committer | Stefan Sperling <ssperling@sysmocom.de> | 2018-03-16 10:35:08 +0100 |
commit | 9c62fc69a8eb9f72da054f908704acbb14a6caa6 (patch) | |
tree | d5065c0e3cce25aa3d54991fcdd0736be2c9fd05 /src | |
parent | 2338145d5b4e27447bb9026c0bb8251a59d7c20d (diff) |
fix bug in parse_cell_id_ci_list()
Cell ID lists with CI were misparsed because parse_cell_id_ci_list()
failed to report the amount of consumed bytes to its caller.
Also add a regression test which uncovered the bug.
Change-Id: Ife4e485e2b86c6f3321c9700611700115ad247b2
Depends: If6b941720de33dca66b6b1aa2cb95a3275708b7f
Related: OS#2847
Diffstat (limited to 'src')
-rw-r--r-- | src/gsm/gsm0808_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index ac1e8520..0165e8af 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -756,7 +756,7 @@ static int parse_cell_id_ci_list(struct gsm0808_cell_id_list2 *cil, const uint8_ if (i >= GSM0808_CELL_ID_LIST2_MAXLEN) return -ENOSPC; cil->id_list[i++].ci = osmo_load16be(ci_be++); - consumed += elemlen; + *consumed += elemlen; remain -= elemlen; } return i; |