diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-04-28 11:05:44 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-06-23 00:30:01 +0200 |
commit | 17778bda23cacfce3a9ad176dcb2d084893c5e66 (patch) | |
tree | db2a00adfa27b0d4070410c812042dab6750349f /include/osmocom/gsm/prim.h | |
parent | 00f4ef7262519ccb48213c9b844e1e015b1c3046 (diff) |
gsm0808: fix length check of the element decoder functions
The length check of the decoder functions is not entirely
correct. The check also checks for values below zero,
which does not make sense, since the length is encoded
as uint8_t.
For some elements a minimum length is known (in most cases
this is 1), so checking for zero is sufficient but in some
cases (e.g. channel type) the spec mentions a minimum and
maximum length. This is now also reflected in the code.
Tweaked-by: nhofmeyr
Change-Id: I78bc887f68d1963d28c6fcd631ac20ccd893d6d6
Diffstat (limited to 'include/osmocom/gsm/prim.h')
0 files changed, 0 insertions, 0 deletions