Always null-terminate CAM periph_name and dev_name
Reported by: Coverity
CID: 1010039, 1010040, 1010041, 1010043
Differential D13194
Always null-terminate CAM periph_name and dev_name asomers on Nov 22 2017, 6:12 PM. Authored by Tags None Referenced Files
Subscribers
Details Always null-terminate CAM periph_name and dev_name Reported by: Coverity camlib tests, basic camcontrol commands
Diff Detail
Event TimelineComment Actions I didn't tag all the places that need it, but I'd be tempted to go with sizeof(dst) rather than a #define that may or may not be right and requires extra brain power to go check for each case. Even w/o it, the change is an improvement.
Comment Actions Looks good, assuming you put sizeof() in there.
|