Skip to content

Commit

Permalink
dev-db/mysql-connector-c: survive malformed charset files
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/737002
Package-Manager: Portage-3.0.3, Repoman-3.0.0
Signed-off-by: Thomas Deutschmann <[email protected]>
  • Loading branch information
Whissi committed Aug 19, 2020
1 parent 6a995cb commit 381aa46
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Description: don't crash on malformed charset files
Origin: https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1877504/comments/19
Bug: https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1884809
Bug: https://bugs.gentoo.org/737002
Forwarded: workaround, not needed

--- a/mysys/charset.cc
+++ b/mysys/charset.cc
@@ -922,7 +922,7 @@ size_t escape_quotes_for_mysql(CHARSET_I

void charset_uninit() {
for (CHARSET_INFO *cs : all_charsets) {
- if (cs && cs->coll->uninit) {
+ if (cs && cs->coll && cs->coll->uninit) {
cs->coll->uninit(cs);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-8.0.18-always-build-decompress-utilities.patch
"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
"${FILESDIR}"/${PN}-8.0.21-libressl.patch
"${FILESDIR}"/${PN}-8.0.21-survive-malformed-charset-files.patch
)

src_prepare() {
Expand Down

0 comments on commit 381aa46

Please sign in to comment.