[mythtv-commits] Ticket #11556: Fix for use after free bug in ParseText.cpp (potential memory corruption/crash)
MythTV
noreply at mythtv.org
Tue May 28 02:01:01 UTC 2013
#11556: Fix for use after free bug in ParseText.cpp (potential memory
corruption/crash)
-------------------------------------------------+-------------------------
Reporter: Gary Buhrmaster <gary.buhrmaster@…> | Type: Patch -
Status: new | Bug Fix
Milestone: unknown | Priority: minor
Version: Master Head | Component: MythTV
Keywords: | - General
| Severity: medium
| Ticket locked: 0
-------------------------------------------------+-------------------------
Static analysis (scan-build) detected a use of memory after free
(realloc). The new string address should be used rather then the old
string address. This patch moves the assignment of the new address to
before the use. In addition, to follow the stated conventions, the string
is zero terminated (even though this is not really a string). Both
changes are consistent with the other code involving this member variable.
The code dates from ~2004/6, and this looks like a copy/paste error
sometime in the past.
https://github.com/garybuhrmaster/mythtv/commit/df4aef6acf73e31f6399ce4c30c2d508e26c72a1
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11556>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list