Review at https://gerrit.osmocom.org/4729
mobile/gsm322.c: prevent buffer over-/under-run Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 --- M src/host/layer23/src/mobile/gsm322.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/4729/1 diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c index 887a0ee..b1e0362 100644 --- a/src/host/layer23/src/mobile/gsm322.c +++ b/src/host/layer23/src/mobile/gsm322.c @@ -322,6 +322,9 @@ else value -= min; + /* Prevent 'bar' buffer over-/under-run */ + OSMO_ASSERT(value > 0 && value < 128); + /* Prevent calling memset() with zero length */ if (value == 0) return ""; -- To view, visit https://gerrit.osmocom.org/4729 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic12587a6c6456b8663e5357cf68a22c6d1927a07 Gerrit-PatchSet: 1 Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com>