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 issues (5) #482

Merged
merged 5 commits into from
Jul 10, 2023
Merged

Conversation

Danielius1922
Copy link
Member

@Danielius1922 Danielius1922 commented Jul 7, 2023

Fixes #467

55910: Unintended sign extension in oc_notify_observers_delayed

55594: Unintended sign extension in oc_notify_observers_delayed_ms
@ocf-conformance-test-tool
Copy link

🎉 Thank you for your code contribution! To guarantee the change/addition is conformant to the OCF Specification, we would like to ask you to execute OCF Conformance Testing of your change ☝️ when your work is ready to be reviewed.


ℹ️ To verify your latest change (9ab778d), label this PR with OCF Conformance Testing.

⚠️ Label is removed with every code change.

@Danielius1922 Danielius1922 force-pushed the adam/bugfix/467-coverity-fixes-5 branch 2 times, most recently from 62f05e1 to 3148d4a Compare July 7, 2023 19:14
@Danielius1922 Danielius1922 linked an issue Jul 7, 2023 that may be closed by this pull request
76 tasks
@Danielius1922 Danielius1922 force-pushed the adam/bugfix/467-coverity-fixes-5 branch from 3148d4a to 7c6dee1 Compare July 7, 2023 20:07
@Danielius1922 Danielius1922 marked this pull request as ready for review July 7, 2023 20:09
@Danielius1922 Danielius1922 added the OCF Conformance Testing OCF Conformance Testing required label Jul 7, 2023
messaging/coap/observe.c Outdated Show resolved Hide resolved
messaging/coap/observe.c Outdated Show resolved Hide resolved
messaging/coap/observe.c Outdated Show resolved Hide resolved
messaging/coap/observe.c Outdated Show resolved Hide resolved
@ocf-conformance-test-tool ocf-conformance-test-tool bot removed the OCF Conformance Testing OCF Conformance Testing required label Jul 8, 2023
@Danielius1922 Danielius1922 force-pushed the adam/bugfix/467-coverity-fixes-5 branch from a5bfa62 to 180e712 Compare July 9, 2023 09:36
55558, 55868: Out-of-bounds access in coap_remove_observer_by_resource
To ensure compatibility with platforms where long is a 32-bit
integer, the unsigned long oc_clock_seconds() function has been
replaced with uint64_t oc_clock_seconds_v1(). This change allows
the representation of UNIX Epoch times beyond the year 2038, which
would otherwise be limited by the 32-bit integer size of long.

Fixes coverity issue:
55774: Use of 32-bit time_t
55781: Unchecked return value in obt_check_owned (obt.c)

55864: Overflowed return value in oc_sec_certs_md_algorithm_is_allowed
  (oc_certs.c)
55937, 55938: Unintentional integer overflow in
  tcp_waiting_session_check (linux/tcp_session.c)

55942: Unintended sign extension in tcp_check_expiring_sessions
  (linux/tcp_session.c)

55943: Unintentional integer overflow in
  tcp_check_expiring_sessions (linux/tcp_session.c)
@Danielius1922 Danielius1922 force-pushed the adam/bugfix/467-coverity-fixes-5 branch from 180e712 to 833d333 Compare July 9, 2023 09:41
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

86.1% 86.1% Coverage
1.6% 1.6% Duplication

@Danielius1922 Danielius1922 requested a review from jkralik July 9, 2023 10:38
@Danielius1922 Danielius1922 added the OCF Conformance Testing OCF Conformance Testing required label Jul 9, 2023
@Danielius1922 Danielius1922 merged commit 7f4e0a8 into master Jul 10, 2023
@Danielius1922 Danielius1922 deleted the adam/bugfix/467-coverity-fixes-5 branch July 10, 2023 06:52
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
OCF Conformance Testing OCF Conformance Testing required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coverity issues
2 participants