diff options
author | unknown <sasha@mysql.sashanet.com> | 2000-08-30 17:50:26 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2000-08-30 17:50:26 -0600 |
commit | 19f7626eb8621f07cba906d027a919583b075758 (patch) | |
tree | 4914b2e9bd5c47e7982c47a5bf6d60f00787e971 /mysys/charset.c | |
parent | dd79d7e1e33db4bc274aecc439d0a68adc43574c (diff) | |
download | mariadb-git-19f7626eb8621f07cba906d027a919583b075758.tar.gz |
fixed coredump on corrupt charset index
mysys/charset.c:
fixed coredump on corrupt charset index
Diffstat (limited to 'mysys/charset.c')
-rw-r--r-- | mysys/charset.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mysys/charset.c b/mysys/charset.c index 82e84715213..384b2c6e71a 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -63,9 +63,10 @@ static uint num_from_csname(CS_ID **cs, const char *name) static char *name_from_csnum(CS_ID **cs, uint number) { CS_ID **c; - for (c = cs; *c; ++c) - if ((*c)->number == number) - return (*c)->name; + if(cs) + for (c = cs; *c; ++c) + if ((*c)->number == number) + return (*c)->name; return "?"; /* this mimics find_type() */ } |