[mythtv-commits] Ticket #11570: Patch for zero length malloc in ParseBinary.cpp
MythTV
noreply at mythtv.org
Thu May 30 18:51:40 UTC 2013
#11570: Patch for zero length malloc in ParseBinary.cpp
-------------------------------------------------+-------------------------
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 feasible code path such that the
string will have a length of zero when ParseString is called. 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
ambiguity. In addition, check the return from malloc to insure it was
successful (should have been be a different static analysis detected
error, but I did not see it in the reports).
https://github.com/garybuhrmaster/mythtv/commit/28a77c36e2d320fa1304ad3822d5359b05af07a0
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11570>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list