[telepathy-sofiasip/master] Guard against a null fmtp parameter for codec parser
Mikhail Zabaluev
mikhail.zabaluev at nokia.com
Mon Nov 30 05:51:24 PST 2009
---
tpsip/codec-param-formats.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/tpsip/codec-param-formats.c b/tpsip/codec-param-formats.c
index c271492..4754fe3 100644
--- a/tpsip/codec-param-formats.c
+++ b/tpsip/codec-param-formats.c
@@ -71,7 +71,7 @@ tpsip_codec_param_format (TpMediaStreamType media, const char *name,
* tpsip_codec_param_parse:
* @media: the media type
* @name: name of the codec, as per its MIME subtype registration
- * @fmtp: a string with the codec-specific parameter data
+ * @fmtp: a string with the codec-specific parameter data. May be #NULL.
* @out: the parameter map to populate
*
* Parses the payload-specific parameter description as coming from an
@@ -84,6 +84,9 @@ tpsip_codec_param_parse (TpMediaStreamType media, const char *name,
{
TpsipCodecParamFormatting *fmt;
+ if (fmtp == NULL)
+ return;
+
/* XXX: thread unsafe, we don't care for now */
fmt = g_hash_table_lookup (codec_param_formats[media], name);
--
1.5.6.5
More information about the telepathy-commits
mailing list