Add a callback for platform faults in platform_util.c
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
5eba1d82a2
commit
7f81c86a0d
5 changed files with 32 additions and 1 deletions
|
@ -48,6 +48,12 @@
|
|||
#include "mbedtls/entropy_poll.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_FAULT_CALLBACKS)
|
||||
#include "platform_fault.h"
|
||||
#else
|
||||
static void mbedtls_platform_fault(){}
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -167,7 +173,7 @@ void *mbedtls_platform_memset( void *ptr, int value, size_t num )
|
|||
return ptr;
|
||||
}
|
||||
}
|
||||
|
||||
mbedtls_platform_fault();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -207,6 +213,7 @@ void *mbedtls_platform_memcpy( void *dst, const void *src, size_t num )
|
|||
return dst;
|
||||
}
|
||||
}
|
||||
mbedtls_platform_fault();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue