From 0e9f9d8bc824e8a0b16f57c89722134bd8df4ed2 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 25 Sep 2009 14:07:33 -0700 Subject: [PATCH] Fix segmentation fault from SIM reading on Calypso modem --- src/simutil.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/simutil.c b/src/simutil.c index b80e014..3a6ca2f 100644 --- a/src/simutil.c +++ b/src/simutil.c @@ -221,6 +221,9 @@ gboolean sim_spdi_lookup(struct sim_spdi *spdi, { struct spdi_operator spdi_op; + if (!spdi) + return FALSE; + g_strlcpy(spdi_op.mcc, mcc, sizeof(spdi_op.mcc)); g_strlcpy(spdi_op.mnc, mnc, sizeof(spdi_op.mnc)); -- 2.7.4