From d6c9c19412c4f640b161ff0909a55a093a839876 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Mar 2005 14:15:37 +0400 Subject: 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. --- strings/ctype-win1250ch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'strings') 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] \ -- cgit v1.2.1