From 2d956a82c8fd3f54fe58ce5a7b597be51c25960b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 4 Jul 2012 21:55:23 +0200 Subject: bssgp: check for IMSI being a null pointer, not just an empty string. --- src/gb/gprs_bssgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index 4b8c7302..83588197 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -811,7 +811,7 @@ int bssgp_tx_dl_ud(struct msgb *msg, uint16_t pdu_lifetime, } /* IMSI */ - if (strlen(dup->imsi)) { + if (dup->imsi && strlen(dup->imsi)) { uint8_t mi[10]; int imsi_len = gsm48_generate_mid_from_imsi(mi, dup->imsi); if (imsi_len > 2) -- cgit v1.2.3