* [PATCH] Fix crash when update service record with an invalid XML
@ 2011-09-18 9:29 Syam Sidhardhan
2011-09-27 9:15 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Syam Sidhardhan @ 2011-09-18 9:29 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Syam Sidhardhan
If we pass an invalid xml to sdp_xml_parse_record(), then it returns
NULL. Further we are passing the this NULL pointer to the
sdp_record_free(), which leads to invalid memory access.
---
plugins/service.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/plugins/service.c b/plugins/service.c
index d73cdea..14a5cb6 100644
--- a/plugins/service.c
+++ b/plugins/service.c
@@ -436,7 +436,6 @@ static DBusMessage *update_xml_record(DBusConnection *conn,
sdp_record = sdp_xml_parse_record(record, len);
if (!sdp_record) {
error("Parsing of XML service record failed");
- sdp_record_free(sdp_record);
return btd_error_failed(msg,
"Parsing of XML service record failed");
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix crash when update service record with an invalid XML
2011-09-18 9:29 [PATCH] Fix crash when update service record with an invalid XML Syam Sidhardhan
@ 2011-09-27 9:15 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-09-27 9:15 UTC (permalink / raw)
To: Syam Sidhardhan; +Cc: linux-bluetooth
Hi Syam,
On Sun, Sep 18, 2011, Syam Sidhardhan wrote:
> If we pass an invalid xml to sdp_xml_parse_record(), then it returns
> NULL. Further we are passing the this NULL pointer to the
> sdp_record_free(), which leads to invalid memory access.
> ---
> plugins/service.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-27 9:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-18 9:29 [PATCH] Fix crash when update service record with an invalid XML Syam Sidhardhan
2011-09-27 9:15 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).