AnsweredAssumed Answered


Question asked by jie wu on Feb 13, 2019



When I transplanted mbedtls on S32K144, the verify of ECDSA was unsuccessful. The problem of malloc () function is found after debugging. In lines 499 to 501 of the alloc.c file, the tail pointer was not modified when the last two blocks of the heap list were attempted to merge. So the reallocation heap block can not be linked to the heap list, resulting in a large amount of heap allocation.


So I think the code should be modified as follows:

//if ((look_ahd != NULL) && (look_ahd->lnk == NULL)) {
tail = &p->lnk;