utzig commented on a change in pull request #1845: Fixes to crypto driver and STM32 URL: https://github.com/apache/mynewt-core/pull/1845#discussion_r293593472
########## File path: hw/drivers/crypto/crypto_stm32/src/crypto_stm32.c ########## @@ -119,18 +129,25 @@ stm32_crypto_op(struct crypto_dev *crypto, uint8_t op, uint16_t algo, status = HAL_CRYP_AESCTR_Decrypt(&g_hcryp, (uint8_t *)inbuf, len, outbuf, HAL_MAX_DELAY); } + if (status == HAL_OK) { + for (total = 0; total < len; total += AES_BLOCK_LEN) { Review comment: Well, on a bit of extra consideration, I think the overflow is only an issue if someone sends A LOT of data to encrypt which does not seem possible, so I will apply the suggested change! :-P ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services