We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In https://github.com/cossacklabs/themis/blob/master/src/soter/boringssl/soter_rand.c#L21, soter_rand() takes a size_t and casts it to int to pass it to RAND_bytes(*, size_t); unlike OpenSSL, boringSSL's RAND_bytes() takes a size_t length and not an int. If more than ~4GB are requested then the call will therefore fail to return the right amount.
soter_rand()
size_t
int
RAND_bytes(*, size_t)
RAND_bytes()
Likewise, the OpenSSL counterpart may check for overflows in the (needed) cast https://github.com/cossacklabs/themis/blob/master/src/soter/openssl/soter_rand.c.
The text was updated successfully, but these errors were encountered:
thank you, makes sense :) will fix.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
In https://github.com/cossacklabs/themis/blob/master/src/soter/boringssl/soter_rand.c#L21,
soter_rand()
takes asize_t
and casts it toint
to pass it toRAND_bytes(*, size_t)
; unlike OpenSSL, boringSSL'sRAND_bytes()
takes asize_t
length and not anint
. If more than ~4GB are requested then the call will therefore fail to return the right amount.Likewise, the OpenSSL counterpart may check for overflows in the (needed) cast https://github.com/cossacklabs/themis/blob/master/src/soter/openssl/soter_rand.c.
The text was updated successfully, but these errors were encountered: