Commit b3372d64 authored by Sergei Golubchik's avatar Sergei Golubchik

use my_random_bytes() that correctly detects error conditions

parent 2119647f
...@@ -1517,7 +1517,7 @@ String *Item_func_random_bytes::val_str(String *str) ...@@ -1517,7 +1517,7 @@ String *Item_func_random_bytes::val_str(String *str)
goto err; goto err;
str->length(count); str->length(count);
if (!RAND_bytes((unsigned char *) str->ptr(), (int32) count)) if (my_random_bytes((unsigned char *) str->ptr(), (int32) count))
{ {
ulong ssl_err; ulong ssl_err;
while ((ssl_err= ERR_get_error())) while ((ssl_err= ERR_get_error()))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment