summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/gsm411_sms.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/layer23/src/mobile/gsm411_sms.c')
-rw-r--r--src/host/layer23/src/mobile/gsm411_sms.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/gsm411_sms.c b/src/host/layer23/src/mobile/gsm411_sms.c
index 08df0f28..45decfd9 100644
--- a/src/host/layer23/src/mobile/gsm411_sms.c
+++ b/src/host/layer23/src/mobile/gsm411_sms.c
@@ -579,6 +579,9 @@ static int gsm340_gen_tpdu(struct msgb *msg, struct gsm_sms *sms)
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);