Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CID-300588, 307566, 307559 #8256

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

hlaccabu
Copy link
Collaborator

@hlaccabu hlaccabu commented Jun 27, 2024

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.

@gbuildx
Copy link
Collaborator

gbuildx commented Jun 27, 2024

Can one of the admins verify this patch?

@hlaccabu
Copy link
Collaborator Author

Signed-off-by: Hayden Laccabue [email protected]

Copy link
Collaborator

@saifuddin-xilinx saifuddin-xilinx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@stsoe
Copy link
Collaborator

stsoe commented Jul 1, 2024

Hi @hlaccabu . Changes look good. Can we change the title of the PR to include the CID numbers you have fixed?
We try to do "CID-number, number, number ... " as PR title then include a brief summary in the description if necessary.
The CID-number is the Coverity ID of the defect you are fixing.

@hlaccabu hlaccabu changed the title Fixing a few Coverity issues found in a couple files in /src/runtime_src/core/pcie/driver/linux/xocl/userpf CID-300588, 307566, 307559 Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants