pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/28940 )
Change subject: cbsp: Guard against malformed msgb without l1h being passed ......................................................................
cbsp: Guard against malformed msgb without l1h being passed
Change-Id: Ie8854c780cfd96e67df10c1fc38c6b99ec07422f --- M src/gsm/cbsp.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/28940/1
diff --git a/src/gsm/cbsp.c b/src/gsm/cbsp.c index c2a1b8d..39ea77d 100644 --- a/src/gsm/cbsp.c +++ b/src/gsm/cbsp.c @@ -1272,6 +1272,9 @@ if (!out) return NULL;
+ if (!h) + goto out_err; + if (msgb_l1len(in) < sizeof(*h)) { goto out_err; }