Attention is currently required from: bucketking657, laforge, pespin.
bucketking657 uploaded patch set #2 to this change.
The following approvals got outdated and were removed: Code-Review+1 by laforge, Code-Review-1 by pespin, Verified+1 by Jenkins Builder
gsm: fix one-byte overflow in BCD number encoders
gsm48_encode_bcd_number() checked only the L octet against max_len,
the size of bcd_lv, but it also writes the L octet itself, so a number
one or two digits over the spec maximum wrote one byte past the buffer.
Count the L octet in the check, and compute the length in an int so
that it cannot wrap. Add tests.
osmo-sgsn passes max_len 8 for the 9-byte IMEISV, which needs
Change-Id Ied06aa05ee6850ec0df34a51cdce6df12e0b594c first.
Fixes: OS#7126
Change-Id: I99521d30896f3d58ecfb28de290bce7e31388fca
---
M src/gsm/gsm48_ie.c
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
M tests/gsm0808/gsm0808_test.c
M tests/gsm0808/gsm0808_test.ok
5 files changed, 137 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/44142/2
To view, visit change 44142. To unsubscribe, or for help writing mail filters, visit settings.