commit | c71b7eb0e7b9a0ecfe16a418c4c9735af230259f | [log] [tgz] |
---|---|---|
author | Andres AG <andres.amayagarcia@arm.com> | Thu Jan 19 11:24:33 2017 +0000 |
committer | Andres AG <andres.amayagarcia@arm.com> | Wed Feb 15 10:44:02 2017 +0000 |
tree | cc460bbf23f58b57f0f4e5f4a700a7c47faf1b16 | |
parent | df33a6a8056be7fcb8a1784fa026d0308f19dc7b [diff] |
Fix data loss in unsigned int cast in PK This patch introduces some additional checks in the PK module for 64-bit systems only. The problem is that the API functions in the PK abstraction accept a size_t value for the hashlen, while the RSA module accepts an unsigned int for the hashlen. Instead of silently casting size_t to unsigned int, this change checks whether the hashlen overflows an unsigned int and returns an error.