OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20e74fe
)
sdp: Fix missing sdp_xml_parse_string_decode() NULL return check
author
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 16 Jun 2014 13:06:49 +0000
(16:06 +0300)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 16 Jun 2014 13:09:12 +0000
(16:09 +0300)
src/sdp-xml.c
patch
|
blob
|
history
diff --git
a/src/sdp-xml.c
b/src/sdp-xml.c
index
a9c4723
..
0535d09
100644
(file)
--- 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;