diff options
| author | Daniel P. Berrange | 2016-09-12 13:50:12 +0200 |
|---|---|---|
| committer | Daniel P. Berrange | 2016-09-19 17:30:42 +0200 |
| commit | 59b060be184aff59cfa101c937c8139e66f452f2 (patch) | |
| tree | 13d4ef9afbe1339633ecb47b64794d6da8a2a525 /block | |
| parent | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (diff) | |
| download | qemu-59b060be184aff59cfa101c937c8139e66f452f2.tar.gz qemu-59b060be184aff59cfa101c937c8139e66f452f2.tar.xz qemu-59b060be184aff59cfa101c937c8139e66f452f2.zip | |
crypto: use uint64_t for pbkdf iteration count parameters
The qcrypto_pbkdf_count_iters method uses a 64 bit int
but then checks its value against INT32_MAX before
returning it. This bounds check is premature, because
the calling code may well scale the iteration count
by some value. It is thus better to return a 64-bit
integer and let the caller do range checking.
For consistency the qcrypto_pbkdf method is also changed
to accept a 64bit int, though this is somewhat academic
since nettle is limited to taking an 'int' while gcrypt
is limited to taking a 'long int'.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions
