From 83ad9553d857acc142e20f1997bc900a479e97f8 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 6 Jan 2016 11:59:47 +0100 Subject: [PATCH] Do not try to open NULL filepath (causes crash on Windows). --- coreapi/bellesip_sal/sal_op_message.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreapi/bellesip_sal/sal_op_message.c b/coreapi/bellesip_sal/sal_op_message.c index 004d1070d..0c746aba7 100644 --- a/coreapi/bellesip_sal/sal_op_message.c +++ b/coreapi/bellesip_sal/sal_op_message.c @@ -117,7 +117,8 @@ void sal_process_incoming_message(SalOp *op,const belle_sip_request_event_t *eve if ((cipher_xml=is_cipher_xml(content_type))) { /* access the zrtp cache to get keys needed to decipher the message */ LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op)); - FILE *CACHEFD = fopen(lc->zrtp_secrets_cache, "rb+"); + FILE *CACHEFD = NULL; + if (lc->zrtp_secrets_cache != NULL) CACHEFD = fopen(lc->zrtp_secrets_cache, "rb+"); if (CACHEFD == NULL) { ms_warning("Unable to access ZRTP ZID cache to decrypt message"); goto error;