Opened 10 years ago
Closed 10 years ago
#12238 closed Patch - Bug Fix (fixed)
Patch to address technical violation of memcpy null source address
Reported by: | Owned by: | stuartm | |
---|---|---|---|
Priority: | trivial | Milestone: | 0.28 |
Component: | MythTV - General | Version: | Master Head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
Static analysis (scan-build) reported that memcpy could be called with a NULL source address (where length would be zero) when following specific code paths. That is technically a violation of the library function (although most known implementations would operate properly without producing a fault with a length of zero). This patch provides the appropriate check to avoid/resolve the potential issue. One less static analysis reported bug.
Visual check of the code only (the "it looks reasonable to me" check), I have no CAM devices to even consider testing with.
github ref: https://github.com/garybuhrmaster/mythtv/commit/91cb0eae37011db0a916c59cb28d4c3b3351efe5 github git-am ref: https://github.com/garybuhrmaster/mythtv/commit/91cb0eae37011db0a916c59cb28d4c3b3351efe5.patch
In b1056152f9313abf4e512fa5be6b42531b2b7cbd/mythtv: