[mythtv-commits] Ticket #3927: ignytegrabber: mythsoap does not NULL terminate data
MythTV
mythtv at cvs.mythtv.org
Mon Sep 3 14:44:15 UTC 2007
#3927: ignytegrabber: mythsoap does not NULL terminate data
------------------------+---------------------------------------------------
Reporter: anonymous | Owner: stuartm
Type: defect | Status: new
Priority: minor | Milestone: 0.21
Component: mythmovies | Version: head
Severity: low | Mlocked: 0
------------------------+---------------------------------------------------
MythSoap::httpDone() places the retrieved data into a QByteArray called
m_data. m_data is passed via MythSoap::getResponseData() to
IgnyteGrabber::checkHttp() which uses QByteArray::data() to implicitly
construct a QString. The problem is that this particular constructor
expects NULL terminated data but QByteArray::data() returns a raw non-
terminated pointer to the HTTP data. This can cause garbage to appear at
the end of the constructed string. The attached patch contains a fix.
The bug doesn't affect IgnyteGrabber because it does not do particularly
robust checking of the returned data. However, other plugins (e.g. the
one I am working on) may want to use mythsoap in the future and this
garbage data might cause problems.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/3927>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list