Change in ...osmocom-bb[master]: gsm411_sms.c: Handle negative return of gsm340_gen_oa()

laforge gerrit-no-reply at lists.osmocom.org
Sun Jul 21 18:47:21 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14880 )

Change subject: gsm411_sms.c: Handle negative return of gsm340_gen_oa()
......................................................................

gsm411_sms.c: Handle negative return of gsm340_gen_oa()

Change-Id: I36f56e1fbd72d9b31350dc2f8a53e763f79f4c08
Closes: CID#198533
---
M src/host/layer23/src/mobile/gsm411_sms.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c
index 08df0f2..45decfd 100644
--- a/src/host/layer23/src/mobile/gsm411_sms.c
+++ b/src/host/layer23/src/mobile/gsm411_sms.c
@@ -579,6 +579,9 @@
 							sms->address + 1);
 	else
 		da_len = gsm340_gen_oa(da, sizeof(da), 0x0, 0x1, sms->address);
+	if (da_len < 0)
+		return da_len;
+
 	smsp = msgb_put(msg, da_len);
 	memcpy(smsp, da, da_len);
 

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I36f56e1fbd72d9b31350dc2f8a53e763f79f4c08
Gerrit-Change-Number: 14880
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190721/d8d4ff0d/attachment.html>


More information about the gerrit-log mailing list