projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 4.2.34
[yaz-moved-to-github.git]
/
src
/
cclerrms.c
diff --git
a/src/cclerrms.c
b/src/cclerrms.c
index
e9b6a87
..
7e0ac37
100644
(file)
--- a/
src/cclerrms.c
+++ b/
src/cclerrms.c
@@
-30,12
+30,16
@@
static char *err_msg_array[] = {
"Both left - and right truncation not supported",
"Right truncation not supported",
"Embedded truncation not supported",
"Both left - and right truncation not supported",
"Right truncation not supported",
"Embedded truncation not supported",
- "Single charcacter mask not supported"
+ "Single character mask not supported"
};
const char *ccl_err_msg(int ccl_errno)
{
};
const char *ccl_err_msg(int ccl_errno)
{
- return err_msg_array[ccl_errno];
+ if (ccl_errno >= 0 &&
+ ccl_errno < sizeof(err_msg_array)/sizeof(*err_msg_array))
+ return err_msg_array[ccl_errno];
+ else
+ return 0;
}
/*
* Local variables:
}
/*
* Local variables: