From faddcf3c395da640b760c3f701f5bc1f3baae6c4 Mon Sep 17 00:00:00 2001 From: Nayuta Yanagisawa Date: Wed, 10 Aug 2022 10:40:37 +0200 Subject: [PATCH] Do not check symbol returned (or not and so there is some garbadge) by mb_wc() if mb_wc() failed --- sql/strfunc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/strfunc.cc b/sql/strfunc.cc index 99ff9c50588..a0a465bdf94 100644 --- a/sql/strfunc.cc +++ b/sql/strfunc.cc @@ -70,7 +70,7 @@ ulonglong find_set(TYPELIB *lib, const char *str, size_t length, CHARSET_INFO *c if ((mblen= cs->cset->mb_wc(cs, &wc, (const uchar *) pos, (const uchar *) end)) < 1) mblen= 1; // Not to hang on a wrong multibyte sequence - if (wc == (my_wc_t) field_separator) + else if (wc == (my_wc_t) field_separator) break; } }