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

Static analysis issues JSC 2.1 #1458

Closed
chillfig opened this issue Apr 24, 2024 · 0 comments · Fixed by #1465
Closed

Static analysis issues JSC 2.1 #1458

chillfig opened this issue Apr 24, 2024 · 0 comments · Fixed by #1465
Assignees
Labels

Comments

@chillfig
Copy link
Contributor

chillfig commented Apr 24, 2024

Describe the bug
Handful of static analysis issues. This report records the findings from the static analysis to facilitate their tracking.

To Reproduce
N/A. These issues were communicated by JSC.

Source Folder Source Filename Source Line Source Object Disposition
Integer Overflow        
\osal\src\os\inc osapi-clock.h 218 tm Will Not Fix. Overflow is not considered a concern because tm would need to be over 29,227 years in microseconds.
Memset Bound Checking        
\osal\src\os\shared\src\osapi-condvar.c 69 memset   Will Not Fix. Using memset as sizeof(OS_condvar_table) ensures correct array size.
\osal\src\os\shared\src\osapi-condvar.c 294 memset   Will Not Fix. Using memset as sizeof(OS_condvar_prop_t) ensures correct array size.
Replace strlen with strnlen \osal\src\os\shared\src\osapi-condvar.c 301 strncpy   Will Fix. osal PR# 1465
Unchecked return value on Function/Truncation of Data Risk        
\osal\src\os\shared\src\osapi-errors.c 113 snprintf   Will Not Fix. No need to check snprintf return; OS_STATUS_STRING_LENGTH (12) is ample for all status values

Expected behavior
Need to resolve these. Should resolve and/or disposition the higher ranked ones at minimum.

Code snips
N/A

System observed on:
N/A

Additional context
N/A

Reporter Info
Imported from JSC 2.1 static analysis

@chillfig chillfig added the bug label Apr 24, 2024
@chillfig chillfig self-assigned this Apr 24, 2024
@chillfig chillfig added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label May 16, 2024
@chillfig chillfig removed the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Jun 13, 2024
chillfig pushed a commit to chillfig/osal that referenced this issue Jun 13, 2024
chillfig pushed a commit to chillfig/osal that referenced this issue Jun 13, 2024
chillfig pushed a commit to chillfig/osal that referenced this issue Jun 14, 2024
chillfig pushed a commit to chillfig/osal that referenced this issue Jun 14, 2024
chillfig pushed a commit to chillfig/osal that referenced this issue Jun 14, 2024
chillfig pushed a commit to chillfig/osal that referenced this issue Jun 18, 2024
chillfig pushed a commit to chillfig/osal that referenced this issue Jun 21, 2024
…s comments

This commit addresses issues flagged during static analysis by:
- Adding JSC 2.1 disposition comments.
- Making OS_strnlen publicly accessible and replacing strlen with it.
dzbaker added a commit that referenced this issue Jul 2, 2024
Fix #1458, Moves OS_strnlen to public API and adds static analysis comments
@dzbaker dzbaker closed this as completed in 3b40ede Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant