2016-09-07 09:15 AM
I've found a bug in the implementation of osMailCAlloc - the code uses sizeof(queue_id->queue_def->item_sz) when item_sz already has the right value.
@@ -1114,11 +1114,11 @@
void
*osMailCAlloc (osMailQId queue_id, uint32_t millisec)
{
uint32_t i;
void
*p = osMailAlloc(queue_id, millisec);
if
(p) {
-
for
(i = 0; i <
sizeof
(queue_id->queue_def->item_sz); i++) {
+
for
(i = 0; i < queue_id->queue_def->item_sz; i++) {
((uint8_t *)p)[i] = 0;
}
}
return
p;
I'm using STM32Cube 4.0.
2016-09-08 01:01 AM
Hi,
I confirm this bug. It is also checked with new CubeMx version 4.16.1.Regards2018-05-23 02:49 AM
Hello
,Thanks for reporting such problem. This issue is already fixed.
With Regards,
Imen