Fix md5 usage in wsrep part

Related: #1962047
This commit is contained in:
Honza Horak 2021-08-17 15:57:39 +02:00 committed by Michal Schorm
parent e59f4ddf66
commit b23e21d635
2 changed files with 25 additions and 1 deletions

View File

@ -161,3 +161,23 @@ diff -rup mariadb-10.5.9-orig/mysys_ssl/my_sha.ic mariadb-10.5.9/mysys_ssl/my_sh
va_end(args);
}
diff -up mariadb-10.5.10-downstream_modified/storage/innobase/handler/ha_innodb.cc.md5galera mariadb-10.5.10-downstream_modified/storage/innobase/handler/ha_innodb.cc
--- mariadb-10.5.10-downstream_modified/storage/innobase/handler/ha_innodb.cc.md5galera 2021-07-26 17:32:23.649932748 +0200
+++ mariadb-10.5.10-downstream_modified/storage/innobase/handler/ha_innodb.cc 2021-07-27 09:14:46.413734421 +0200
@@ -8279,7 +8279,7 @@ wsrep_calc_row_hash(
dictionary */
row_prebuilt_t* prebuilt) /*!< in: InnoDB prebuilt struct */
{
- void *ctx = alloca(my_md5_context_size());
+ void * const ctx= (void *)EVP_MD_CTX_new();
my_md5_init(ctx);
for (uint i = 0; i < table->s->fields; i++) {
@@ -8335,6 +8335,7 @@ wsrep_calc_row_hash(
}
my_md5_result(ctx, digest);
+ EVP_MD_CTX_free((EVP_MD_CTX *)ctx);
return(0);
}

View File

@ -154,7 +154,7 @@
Name: mariadb
Version: 10.5.12
Release: 1%{?with_debug:.debug}%{?dist}
Release: 2%{?with_debug:.debug}%{?dist}
Epoch: 3
Summary: A very fast and robust SQL database server
@ -1638,6 +1638,10 @@ fi
%endif
%changelog
* Tue Aug 17 2021 Honza Horak <hhorak@redhat.com> - 3:10.5.12-2
- Fix OpenSSL 3.x compatibility
Resolves: #1962047
* Tue Aug 17 2021 Michal Schorm <mschorm@redhat.com> - 3:10.5.12-1
- Rebase to 10.5.12