diff options
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c index d4798c71f..9e1b42538 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c @@ -1026,15 +1026,15 @@ static struct msgb *rewrite_sms(struct bsc_nat *nat, struct msgb *msg, return NULL; } - /* look into the phone number */ - if ((data_ptr[0] & 0x01) != 1) - return NULL; - if (data_len < 3) { LOGP(DNAT, LOGL_ERROR, "SMS-SUBMIT is too short.\n"); return NULL; } + /* look into the phone number */ + if ((data_ptr[0] & 0x01) != 1) + return NULL; + dest_len = data_ptr[2]; if (data_len < dest_len + 3 || dest_len < 2) { LOGP(DNAT, LOGL_ERROR, "SMS-SUBMIT can not have TP-DestAddr.\n"); |