maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #02999
bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2850)
#At lp:maria
2850 knielsen@xxxxxxxxxxxxxxx 2010-04-29
Fix missing bounds check in string conversion.
modified:
strings/ctype-utf8.c
=== modified file 'strings/ctype-utf8.c'
--- a/strings/ctype-utf8.c 2010-03-30 12:36:49 +0000
+++ b/strings/ctype-utf8.c 2010-04-29 07:09:50 +0000
@@ -4116,6 +4116,10 @@ my_wc_mb_filename(CHARSET_INFO *cs __att
{
int code;
char hex[]= "0123456789abcdef";
+
+ if (s >= e)
+ return MY_CS_TOOSMALL;
+
if (wc < 128 && filename_safe_char[wc])
{
*s= (uchar) wc;