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

Fix coverity issue #4759

Closed
tbordaz opened this issue May 6, 2021 · 2 comments
Closed

Fix coverity issue #4759

tbordaz opened this issue May 6, 2021 · 2 comments
Assignees
Milestone

Comments

@tbordaz
Copy link
Contributor

tbordaz commented May 6, 2021

Issue Description
The support of wtime/optime in the access logs, record the hrtime in the operation structure. #/4218 assign the time without checking that operation exists. I triggers failure in coverity scan

Package Version and Platform:
since 1.4.3

Steps to Reproduce
Run covcan

Expected results
No error in opshared.c and extended.c regarding call to slapi_operation_set_time_started

@tbordaz tbordaz added needs triage The issue will be triaged during scrum and removed needs triage The issue will be triaged during scrum labels May 6, 2021
@tbordaz tbordaz added this to the 1.3.10 milestone May 6, 2021
@tbordaz tbordaz self-assigned this May 6, 2021
tbordaz added a commit to tbordaz/389-ds-base that referenced this issue May 6, 2021
Bug description:
	with 389ds#4218 (wtime, optime in access log), hrtime is set in the
	operation. But it is done before checking if the operation is
	set. covscan fails

Fix description:
	move the setting after verification that operation != NULL

relates: 389ds#4759

Reviewed by: Simon Pichugin

Platforms tested: F34
tbordaz added a commit that referenced this issue May 6, 2021
Bug description:
	with #4218 (wtime, optime in access log), hrtime is set in the
	operation. But it is done before checking if the operation is
	set. covscan fails

Fix description:
	move the setting after verification that operation != NULL

relates: #4759

Reviewed by: Simon Pichugin

Platforms tested: F34
tbordaz added a commit that referenced this issue May 7, 2021
Bug description:
	with #4218 (wtime, optime in access log), hrtime is set in the
	operation. But it is done before checking if the operation is
	set. covscan fails

Fix description:
	move the setting after verification that operation != NULL

relates: #4759

Reviewed by: Simon Pichugin

Platforms tested: F34
tbordaz added a commit that referenced this issue May 7, 2021
Bug description:
	with #4218 (wtime, optime in access log), hrtime is set in the
	operation. But it is done before checking if the operation is
	set. covscan fails

Fix description:
	move the setting after verification that operation != NULL

relates: #4759

Reviewed by: Simon Pichugin

Platforms tested: F34
tbordaz added a commit that referenced this issue May 7, 2021
Bug description:
	with #4218 (wtime, optime in access log), hrtime is set in the
	operation. But it is done before checking if the operation is
	set. covscan fails

Fix description:
	move the setting after verification that operation != NULL

relates: #4759

Reviewed by: Simon Pichugin

Platforms tested: F34
@droideck
Copy link
Member

@tbordaz can we close it as the PR was merged? Or do you want to leave the issue for future use?

@tbordaz
Copy link
Contributor Author

tbordaz commented Feb 17, 2022

Opps thanks for the heads up @droideck .

I forgot to add the commit hashes. This bug being fixed in all targeted releases close
9b62aed..ad3e77d master
9b62aed..ad3e77d 389-ds-base-2.0
e0cf8a9..70c3e9e 389-ds-base-1.4.4
d0e0ab3..099c7c2 389-ds-base-1.4.3
ca3776e..8b236bc 389-ds-base-1.3.10

@tbordaz tbordaz closed this as completed Feb 17, 2022
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

No branches or pull requests

2 participants