RIOT
RIOT copied to clipboard
add error check of aes_encrypt()
Contribution description
sys/random/fortuna/fortuna.c:add error check of aes_encrypt() I'm not sure which exact value should be returned when aes_encrypt() is not on success. I just return the return value of it.
Issues/PRs references
Addresses parts of #15524
ping @Hxinrong! :)
@basilfx you put a change request on this PR. What did you want changed?
@PeterKietzmann I think that it should not return res
but return -3
(or another negative value) if aes_encrypt != 1
.
The documentation states that aes_encrypt
either returns 1 or a negative value. Returning res
could be a problem if aes_encrypt
would return something else (due to an API change, another implementation, etc).
@basilfx could you give it another look?
Murdock results
:heavy_check_mark: PASSED
bf3c038fa97d83561f47c48732eb7bef45291570 sys/random/fortuna/fortuna.c:add error check of aes_encrypt()
Success | Failures | Total | Runtime |
---|---|---|---|
8629 | 0 | 8629 | 11m:10s |