https://bugs.linaro.org/show_bug.cgi?id=1905
Bug ID: 1905
Summary: CID 154167: Memory - illegal accesses:
/helper/lineartable.c
Product: OpenDataPlane - linux- generic reference
Version: 1.4
Hardware: Other
OS: Linux
Status: UNCONFIRMED
Severity: enhancement
Priority: ---
Component: General ODP
Assignee: [email protected]
Reporter: [email protected]
https://scan.coverity.com/projects/odp
*** CID 154167: Memory - illegal accesses (BUFFER_SIZE_WARNING)
/helper/lineartable.c: 77 in odph_linear_table_create()
71
72 /* clean this block of memory */
73 memset(tbl, 0, capacity << 20);
74
75 tbl->init_cap = capacity < 20;
76
>>> CID 154167: Memory - illegal accesses (BUFFER_SIZE_WARNING)
>>> Calling strncpy with a maximum size argument of 32 bytes on destination
>>> array "tbl->name" of size 32 bytes might leave the destination string
>>> unterminated.
77 strncpy(tbl->name, name, ODPH_TABLE_NAME_LEN);
78
79 /* for linear table, the key is just the index, without confict
80 * so we just need to record the value content
81 * there is a rwlock in the head of every node
82 */
** CID 154166: Memory - illegal accesses (BUFFER_SIZE_WARNING)
/helper/hashtable.c: 95 in odph_hash_table_create()
________________________________________________________________________________________________________
*** CID 154166: Memory - illegal accesses (BUFFER_SIZE_WARNING)
/helper/hashtable.c: 95 in odph_hash_table_create()
89 tbl = (odph_hash_table_imp *)odp_shm_addr(shmem);
90
91 /* clean this block of memory */
92 memset(tbl, 0, capacity << 20);
93
94 tbl->init_cap = capacity << 20;
>>> CID 154166: Memory - illegal accesses (BUFFER_SIZE_WARNING)
>>> Calling strncpy with a maximum size argument of 32 bytes on destination
>>> array "tbl->name" of size 32 bytes might leave the destination string
>>> unterminated.
95 strncpy(tbl->name, name, ODPH_TABLE_NAME_LEN);
96 tbl->key_size = key_size;
97 tbl->value_size = value_size;
98
99 /* header of this mem block is the table control struct,
100 * then the lock pool, then the list header pool
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp