use my_random_bytes() that correctly detects error conditions

This commit is contained in:
Sergei Golubchik 2022-07-29 19:39:55 +02:00
parent 2119647f7d
commit b3372d6422

View file

@ -1517,7 +1517,7 @@ String *Item_func_random_bytes::val_str(String *str)
goto err;
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;
while ((ssl_err= ERR_get_error()))