summaryrefslogtreecommitdiff
path: root/strings/int2str.c
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2007-03-27 12:20:20 +0500
committerunknown <bar@mysql.com>2007-03-27 12:20:20 +0500
commit916245f9c41c3f6170e384ed6d9241ed79ca781e (patch)
treedcc136c3c9616a49226c3f72b194cbcb976c383c /strings/int2str.c
parent685d21b72f201a2eb16718e73c76e62ee708458d (diff)
downloadmariadb-git-916245f9c41c3f6170e384ed6d9241ed79ca781e.tar.gz
Bug#27079 Crash while grouping empty ucs2 strings
Problem: GROUP BY on empty ucs2 strings crashed server. Reason: sometimes mi_unique_hash() is executed with ptr=null and length=0, which means "empty string". The branch of code handling UCS2 character set was not safe against ptr=null and fell into and endless loop even if length=0 because of poiter arithmetic overflow. Fix: adding special check for length=0 to avoid pointer arithmetic overflow. mysql-test/r/ctype_uca.result: Adding test case mysql-test/t/ctype_uca.test: Adding test case strings/ctype-uca.c: Fix my_uca_scanner_init_ucs2 to be safe against strings with length=0 and ptr=0.
Diffstat (limited to 'strings/int2str.c')
0 files changed, 0 insertions, 0 deletions