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 10:50:39 UTC 2019


laforge has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/80/14880/1

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: 1
Gerrit-Owner: laforge <laforge at gnumonks.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190721/68dc684d/attachment.html>


More information about the gerrit-log mailing list