-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixarea: KernelbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug
Description
Static code scan issues found in file:
Category: Insecure data handling
Function: z_tick_sleep
Component: Kernel
CID: 529867
Details:
Line 1116 in fd6b05c
return ticks; |
1110 uint32_t left_ticks = expected_wakeup_ticks - sys_clock_tick_get_32();
1111
1112 /* To handle a negative value correctly, once type-cast it to signed 32 bit */
1113 k_ticks_t ticks = (k_ticks_t)(int32_t)left_ticks;
1114
1115 if (ticks > 0) {
>>> CID 529867: Insecure data handling (INTEGER_OVERFLOW)
>>> "ticks", which might have underflowed, is returned from the function.
1116 return ticks;
1117 }
1118
1119 return 0;
1120 }
1121
For more information about the violation, check the Coverity Reference. (CWE-190)
Please fix or provide comments in coverity using the link:
https://scan9.scan.coverity.com/#/project-view/29271/12996?selectedIssue=529867
Note: This issue was created automatically. Priority was set based on classification
of the file affected and the impact field in coverity. Assignees were set using the MAINTAINERS file.
Also see the related Coverity documentation for more information.
Metadata
Metadata
Assignees
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixarea: KernelbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug