Opened 18 years ago
Closed 17 years ago
#3927 closed defect (fixed)
ignytegrabber: mythsoap does not NULL terminate data
Reported by: | anonymous | Owned by: | paulh |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythmovies | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
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.
Attachments (2)
Change History (5)
Changed 18 years ago by
Attachment: | mythsoap-null-terminate.patch added |
---|
Changed 18 years ago by
Attachment: | mythsoap-null-terminate.2.patch added |
---|
Updated patch to add a 'getError' method
comment:1 Changed 18 years ago by
Owner: | changed from stuartm to Isaac Richards |
---|
comment:2 Changed 17 years ago by
Owner: | changed from Isaac Richards to paulh |
---|---|
Status: | new → assigned |
NULL terminate data returned from mythsoap