From a36ee4a4eecb4fc5f3667ce1c3304092f414909b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 16 Jun 2014 16:06:49 +0300 Subject: [PATCH] sdp: Fix missing sdp_xml_parse_string_decode() NULL return check --- src/sdp-xml.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sdp-xml.c b/src/sdp-xml.c index a9c472350..0535d0906 100644 --- a/src/sdp-xml.c +++ b/src/sdp-xml.c @@ -369,6 +369,8 @@ static sdp_data_t *sdp_xml_parse_url(const char *data) url = sdp_xml_parse_string_decode(data, SDP_XML_ENCODING_NORMAL, &length); + if (!url) + return NULL; if (length > UCHAR_MAX) dtd = SDP_URL_STR16; @@ -388,6 +390,8 @@ static sdp_data_t *sdp_xml_parse_text(const char *data, char encoding) sdp_data_t *ret; text = sdp_xml_parse_string_decode(data, encoding, &length); + if (!text) + return NULL; if (length > UCHAR_MAX) dtd = SDP_TEXT_STR16; -- 2.47.3