[mythtv-commits] Ticket #11570: Patch for zero length malloc in ParseBinary.cpp
MythTV
noreply at mythtv.org
Tue Jun 4 18:53:28 UTC 2013
#11570: Patch for zero length malloc in ParseBinary.cpp
-------------------------------------+-------------------------------------
Reporter: Gary Buhrmaster | Owner: Gary Buhrmaster
<gary.buhrmaster@…> | <gary.buhrmaster@…>
Type: Patch - Bug Fix | Status: closed
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Master Head
Severity: medium | Resolution: fixed
Keywords: | Ticket locked: 0
-------------------------------------+-------------------------------------
Changes (by Gary Buhrmaster <gary.buhrmaster@…>):
* owner: => Gary Buhrmaster <gary.buhrmaster@…>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:b44f38e8487d521685521a8a50b12119d23e1cb8/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="b44f38e8487d521685521a8a50b12119d23e1cb8"
Patch for zero length malloc and check for malloc success
There is a feasible code path such that the string will
have a length of zero. Malloc of a zero length has a
implementation dependent result (i.e. possible invalid
memory pointer). Add one to the requested length to
eliminate the abiguity. In addition, check the return
from malloc to insure it was successful.
(cherry picked from commit 28a77c36e2d320fa1304ad3822d5359b05af07a0)
Signed-off-by: Stuart Morgan <smorgan at mythtv.org>
Fixes #11570
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11570#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list