未验证 提交 6d3c0be6 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #3453 from DavidLin1577/patch-6

[bsp]Fixed a  stack overflow bug in drv_crypto.c
......@@ -168,6 +168,11 @@ static rt_err_t _crypto_create(struct rt_hwcrypto_ctx *ctx)
case HWCRYPTO_TYPE_RNG:
{
RNG_HandleTypeDef *hrng = rt_calloc(1, sizeof(RNG_HandleTypeDef));
if (RT_NULL == hrng)
{
res = -RT_ERROR;
break;
}
hrng->Instance = RNG;
HAL_RNG_Init(hrng);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册