Skip to content

Commit

Permalink
Correct length check in my_wc_mb_filename()
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lindström committed Dec 7, 2015
1 parent e528fe7 commit d85168e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mysql-test/r/ctype_filename.result
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ create table com1 (a int);
drop table com1;
create table `clock$` (a int);
drop table `clock$`;
select convert(convert(',' using filename) using binary);
convert(convert(',' using filename) using binary)
@002c
3 changes: 3 additions & 0 deletions mysql-test/t/ctype_filename.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ drop table com1;

create table `clock$` (a int);
drop table `clock$`;

select convert(convert(',' using filename) using binary);

2 changes: 1 addition & 1 deletion strings/ctype-utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -4585,7 +4585,7 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
}

/* Non letter */
if (s + 5 > e)
if (s + 4 > e)
return MY_CS_TOOSMALL5;

*s++= hex[(wc >> 12) & 15];
Expand Down

0 comments on commit d85168e

Please sign in to comment.