From b3372d642265237aaa25e45c73d337068c1d5d1a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 29 Jul 2022 19:39:55 +0200 Subject: [PATCH] use my_random_bytes() that correctly detects error conditions --- sql/item_strfunc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 2eebe78929b..4397a11704c 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -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()))