Issue created by Joel Sherrill: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5736

Assignee: Sebastian Huber

## Summary
## Summary
CID #1399703

Coverity Scan detected taking the address of the _uint32_t_ _active_posix_keys_ 
and treating it as an array.

```
125  get_heap_info( RTEMS_Malloc_Heap, &snapshot->heap_info );
126  get_heap_info( &_Workspace_Area, &snapshot->workspace_info );
127
        1. address_of: Taking address with &snapshot->active_posix_keys yields 
a singleton pointer.
        2. assign: Assigning: active = &snapshot->active_posix_keys.
128  active = &snapshot->active_posix_keys;
/cpukit/include/rtems/libcsupport.h
153  uint32_t active_posix_keys;
129
        3. Condition i < 15U /* sizeof (objects_info_table) / sizeof 
(objects_info_table[0]) */, taking true branch.
130  for ( i = 0; i < RTEMS_ARRAY_SIZE( objects_info_table ); ++i ) {
131    const Objects_Information *information;
132
133    information = _Objects_Get_information(
134      objects_info_table[ i ].api,
135      objects_info_table[ i ].cls
136    );
137
        4. Condition information != NULL, taking true branch.
138    if ( information != NULL ) {
        
CID 1399703: (#1 of 1): Out-of-bounds access (ARRAY_VS_SINGLETON)
5. ptr_arith: Using active as an array. This might corrupt or misinterpret 
adjacent memory locations.
139      active[ i ] = _Objects_Active_count( information );
140    }
141  }
```


<!-- Pre-set options
- milestone
-->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5736
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/sent_notifications/5-79byky9qyjeu7yoozgdxztguj-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to