From 3c079c410f057e413324dffcf5052068ff6ccaac Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 25 May 2008 13:54:56 +0000 Subject: [PATCH] Tue May 20 09:30:06 EDT 2008 Pekka.Pessi@nokia.com * msg_mime.c: fixed klocwork issues git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8611 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 8fe22a9f8c..36267500fb 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Sun May 25 09:53:58 EDT 2008 +Sun May 25 09:54:31 EDT 2008 diff --git a/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c b/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c index ad41199ae4..f3099b5d8f 100644 --- a/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c +++ b/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c @@ -1871,8 +1871,10 @@ char *msg_content_type_dup_one(msg_header_t *dst, msg_header_t const *src, b = msg_params_dup(&c->c_params, o->c_params, b, xtra); MSG_STRING_DUP(b, c->c_type, o->c_type); - c->c_subtype = strchr(c->c_type, '/'); - c->c_subtype++; + + c->c_subtype = c->c_type ? strchr(c->c_type, '/') : NULL; + if (c->c_subtype) + c->c_subtype++; assert(b <= end); (void)end;