1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug#49134 5.1 server segfaults with 2byte collation file

Problem: add_collation did not check that cs->number is smaller
than the number of elements in the array all_charsets[],
so server could crash when loading an Index.xml file with
a collation ID greater the number of elements 
(for example when downgrading from 5.5).

Fix: adding a condition to check that cs->number is not out of valid range.
This commit is contained in:
Alexander Barkov
2009-12-15 13:48:29 +04:00
parent 4578a5c61b
commit cff23162ec
2 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,13 @@
</rules>
</collation>
<collation name="utf8_hugeid_ci" id="2047000000">
<rules>
<reset>a</reset>
<s>b</s>
</rules>
</collation>
</charset>
<charset name="ucs2">