diff options
author | unknown <bar@mysql.com> | 2004-11-16 16:45:47 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2004-11-16 16:45:47 +0400 |
commit | b226bebcc81b820c10c8cadafbf9fc0483f780e3 (patch) | |
tree | d65bdcd1b9c7d5cfac2109200a0cd84ff5575d44 /strings | |
parent | a2b3d71d1f1c866406b691e6b15de275b0d8dceb (diff) | |
download | mariadb-git-b226bebcc81b820c10c8cadafbf9fc0483f780e3.tar.gz |
ctype-tis620.c:
Space allocated didn't take in account trailing '\0' bytes.
strings/ctype-tis620.c:
Space allocated didn't take in account trailing '\0' bytes.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-tis620.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 68bfefafe6a..5d37aa965d9 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -541,7 +541,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)), tc1= buf; if ((len1 + len2 +2) > (int) sizeof(buf)) - tc1= (uchar*) malloc(len1+len2); + tc1= (uchar*) malloc(len1+len2+2); tc2= tc1 + len1+1; memcpy((char*) tc1, (char*) s1, len1); tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */ @@ -568,7 +568,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), a= buf; if ((a_length + b_length +2) > (int) sizeof(buf)) - alloced= a= (uchar*) malloc(a_length+b_length); + alloced= a= (uchar*) malloc(a_length+b_length+2); b= a + a_length+1; memcpy((char*) a, (char*) a0, a_length); |