summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2005-03-03 14:15:37 +0400
committerunknown <bar@mysql.com>2005-03-03 14:15:37 +0400
commitd6c9c19412c4f640b161ff0909a55a093a839876 (patch)
treeaedc603b20deeb9ec92742ec5b1624aacbccd66f /strings
parent763ce399f75b5809c801bf33d23a212427b06d84 (diff)
downloadmariadb-git-d6c9c19412c4f640b161ff0909a55a093a839876.tar.gz
Bug#8840 Empty string comparison and character set 'cp1250'
Secondary weight out of bounds was picked up in mistake when the string is empty, instead of returning 0.
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-win1250ch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index 98389a9a5a4..d843971b93f 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -416,7 +416,7 @@ static struct wordvalue doubles[] = {
#define NEXT_CMP_VALUE(src, p, pass, value, len) \
while (1) { \
if (IS_END(p, src, len)) { \
- if (pass == 0) { p = src; pass++; } \
+ if (pass == 0 && len > 0) { p= src; pass++; } \
else { value = 0; break; } \
} \
value = ((pass == 0) ? _sort_order_win1250ch1[*p] \