Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 28a77c3) Signed-off-by: Stuart Morgan <smorgan@mythtv.org> Fixes #11570
- Loading branch information