summaryrefslogtreecommitdiff
path: root/myisam/mi_open.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2003-01-27 17:27:21 +0100
committerunknown <serg@serg.mysql.com>2003-01-27 17:27:21 +0100
commit2aa304d37c1de25b3b18f4eee24a4874a9ce0f0f (patch)
tree7db11179f34171647850df8553035f94a6af46be /myisam/mi_open.c
parent9040fd7d75bbcff57b7cf39ecb877f44c48e5f8e (diff)
downloadmariadb-git-2aa304d37c1de25b3b18f4eee24a4874a9ce0f0f.tar.gz
protection agains badly charsed indexfile
Diffstat (limited to 'myisam/mi_open.c')
-rw-r--r--myisam/mi_open.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index 250e0483fe5..4eb7376cdb6 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -329,7 +329,11 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
{
*pos=ft_keysegs[j];
pos[0].language= pos[-1].language;
- pos[0].charset= pos[-1].charset;
+ if (!(pos[0].charset= pos[-1].charset))
+ {
+ my_errno=HA_ERR_CRASHED;
+ goto err;
+ }
pos++;
}
}