XRT
XRT copied to clipboard
CID-300588, 307566, 307559
Fixing a few Coverity issues found in a couple files in /src/runtime_src/core/pcie/driver/linux/xocl/userpf
Problem solved by the commit
A few issues found by the Coverity scan that could cause problems.
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
Copy into fixed size buffer, uninitialized scalar variable, and logically dead code in xocl_hwctx.c, xocl_ioctl.c, and xocl_sysfs.c, respectively.
How problem was solved, alternative solutions (if any) and why they were rejected
Use strlcpy() instead of strcpy(), initialized uninit variable to 0 (as is consistent with rest of code), and removed conditional that was logically dead.