Change in osmo-bsc[master]: handover_fsm.c: fix: prevent possible buffer overflow

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue May 7 06:30:46 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13885 )

Change subject: handover_fsm.c: fix: prevent possible buffer overflow
......................................................................

handover_fsm.c: fix: prevent possible buffer overflow

Change-Id: If51f8f82d3b2462cb7d7a531fe4411509344842b
Fixes: CID#197643
---
M src/osmo-bsc/handover_fsm.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 442f7be..22618c5 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -637,6 +637,7 @@
 		if (req->ei.key_len > sizeof(info.encr.key)) {
 			ho_fail(HO_RESULT_ERROR, "Encryption Information IE key length is too large: %u\n",
 				req->ei.key_len);
+			return;
 		}
 		memcpy(info.encr.key, req->ei.key, req->ei.key_len);
 		info.encr.key_len = req->ei.key_len;

-- 
To view, visit https://gerrit.osmocom.org/13885
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If51f8f82d3b2462cb7d7a531fe4411509344842b
Gerrit-Change-Number: 13885
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190507/99a3f925/attachment.html>


More information about the gerrit-log mailing list